Posts Tagged ‘cselement’


Most of us might have seen the concept of Wrapper page in Fatwire projects. Even I too used to wonder what purpose this page might be serving, why is this used, etc.

I have seen this concept in many of the projects, and even in the FIRSTSITEII example site shipped with JSK. We will now see in brief, about wrapper page in Fatwire

A WRAPPER PAGE in FATWIRE is an ELEMENT (a CSElement, infact) that is called to perform the logic on the content server. Its sole purpose is to perform logic that must always be performed on Content Server even in a fully cached environment.

Following are few of the usages of a wrapper page:

  1. Checking security measures
  2. Setting default locale
  3. Getting the current locale
  4. Setting default values for parameters
  5. Validating URL
  6. Redirecting pages accordingly, etc.

The wrapper page (CSElement)  is usually not cached, while the Layout (template) usually is cached.

Creation of a wrapper page is a two step process.

  1. A CSElement should be created.
  2. A SiteEntry that points to the previously created CSElement. The SiteEntry must be declared as a “Wrapper Page”. Refer the below screenshot. The screen below shows the wrapper page option, in the SITEENTRY creation screen.

Untitled

When you have a wrapper page created, you can even remove the external accessibility of the Layout.  In this case, the wrapper page will act as the ONLY entry point for a site.

So, when you create a WRAPPER PAGE in your implementation, what ever the page you view, the request will go to the WRAPPER PAGE first. Then the control will be passed to the respective pages (According to what we code in the wrapper). Hence, WE ARE NOT invoking the wrapper page manually. The wrapper page is getting invoked automatically by the content server.

In general, it is a good and common practice to implement a wrapper page and call it, rather than calling the layout page directly.


Fatwire ships with a lot of Attribute Editors, like TextArea, TextField, etc. But sometimes, you may require to create some custom attribute editors.

Example:

When the author enters some unwanted value in the attribute field, you may want to display some message, or an alert to the user. In such a case, the system attribute editors will not be helpful. You need to create a custom attribute editor. This is just a weird example. But there might be some serious situations, where you require the usage of custom attribute editors.

To create a custom attribute editor, you need to CREATE two things :

1. The main ELEMENT (CSElement) which defines the behavior of the Attribute Editor.
2. The Attribute Editor XML file, which we generally create in the Administrator UI.

Creation of the CSELEMENT:

Points to be Noted:

1. The name of the ELEMENT (CS-Element) must be the same name, as which we use in the attribute editor code. For example, the following TEXTAREA tag has a default TEXTAREA.xml

<PRESENTATIONOBJECT NAME=”TextAreaTest”>

<TEXTAREA>        …….     This TEXTAREA refers to the TEXTAREA.XML Element

</TEXTAREA>

</….>

2. The new ELEMENT must be placed under the following path :

OpenMarket/Gator/AttributeTypes/[ELEMENT-NAME]

For the sake of simplicity, I would like to Create a custom attribute editor called My_TextField_Editor with the features of TextArea attribute editor, along with my custom changes. Hence, I need copy the features of TEXTAREA attribute editor, and want to add some other features.

So, create a new CS-Element with  OpenMarket/Gator/AttributeTypes/My_TextField_Editor.  (Include your own features along with the TEXTAREA element).

Creation of the Attribute Editor:

Now, that the element is created, we need to create the Attribute Editor.

Create an Attribute Editor with the same name of the ELEMENT, i.e, My_TextField_Editor (in this case).

 

<<<<<Code for Attribute Editor goes here…>>>>

 <PRESENTATIONOBJECT NAME=”Sample”> <My_TextField_Editor>

</My_TextField_Editor> </PRESENTATIONOBJECT>

<<<<<Code for Attribute Editor goes here…>>>>

 

That’s it.

Your new CUSTOM ATTRIBUTE EDITOR is created.

Now, To check the attribute editor, create an attribute, include it in a content definition, and then try to create the content. In the content creation screen, the design of the custom attribute editor appears.


Fatwire Interview Questions:

Fatwire Interview Questions” is one of the most frequently googled search term in Google. Hence, I’m coming today with a list of Fatwire Interview questions. The same will be applied for Oracle WebCenter Sites as-well.

Note: These are the questions which I’ve faced from most of the interviewers.

  1. What are the different versions of Fatwire that you have worked on?
  2. Explain difference between Basic Asset Model and Flex Asset Model?
  3. Explain difference between CSElement and Template?
  4. Explain about templates and its need in Fatwire CMS?
  5. Explain how will you handle multi-level languages in Fatwire?
  6. Explain about Asset and Asset Type?
  7. Explain about the Basic Asset Model?
  8. Explain about the Flex Asset Model?
  9. Explain about Rendering?
  10. Explain about different Publishing methodologies?
  11. Explain about the types of publishing Fatwire supports?
  12. Explain about Roles and ACLs?
  13. Explain about Attribute Editors and how will you create Attribute Editors?
  14. Explain about Workflow?
  15. Explain about the default asset types of Fatwire?
  16. Explain the use of Page Asset Type in Fatwire CMS?
  17. Explain the use of CSElement, SiteEntry and Template Asset Types?
  18. When will you use asset:getattributevalues and assetset:getmultiplevalues?
  19. What are the limitations of the tag assetset:getmultiplevalues?
  20. What is the difference between asset:list and assetset:getassetlist tag?
  21. How will you perform Error handling in JSP?
  22. What happens behind the scene when I hit an URL and invoke a page in Fatwire CMS?
  23. I want to know how many flex assets are available in my Article AssetType. Is it possible to know that? If so, how can we know that?
  24. Explain about the Recommendations, Collections, Queries, Segment, and Promotion?
  25. How to re-use the asset types that are present in one site, in another site?
  26. Explain about XMLPost and BulkLoader utilities?

Happy Job Hunting…. 


Many a times, while programming in FATWIRE, there will be a confusion about the usage of the appropriate tag, when try to call a TEMPLATE, or CSELEMENT, or SITEENTRY assets. This article makes a point to clear that confusion. We will now see which tag to be used appropriately for the above said assets.

1.  As a SITEENTRY is a pagelet, we need to call it with a tag, that renders pages. RENDER.SATELLITEPAGE is the tag that is used to call the SiteEntries from our code.

2. Since a CSELEMENT has a piece of code, and itself is an Element, we need to use a tag that renders Elements. RENDER.CALLELEMENT is the tag that is used to call the CSElements from our code.

3. Since a TEMPLATE is both (Has a Page name, and has Element,i.e, code), it can be called bye both the above said tags. However, Fatwire has given another tag, especially for calling the Templates. RENDER.CALLTEMPLATE is the tag that is used to call a Template from our code.