+

Search Tips   |   Advanced Search


Use the portal Web 2.0 theme

Learn how to use the portal Web 2.0 theme, assigning it, and using it under CSA and SSA mode.

The Web 2.0 theme is assigned to a page just like any other portal theme. When a traditional SSA theme is being used, each page request goes to the portal server engine. The portal server engine determines the theme assigned to the requested page and returns that theme in the response. The first time a user selects a page with a Web 2.0 Portal theme, the portal loads the theme and initializes the CSA aggregator. From then on, page changes are handled by the CSA aggregator rather than by a full page refresh. Consequently, the normal SSA mechanism of switching themes per page is not invoked. If the user selects a page to which a different theme is assigned, the CSA aggregator detects this and initiates a full page refresh. This way the new theme is loaded.

When using client side aggregation in the portal, updates occur asynchronously between client and server. Therefore most of the time the URL in the browser address field does not match the state of the page as shown in the browser. If users want to create a link and bookmark to a page, they can click the link Create link to this page. Clicking this link opens a field with the correct URL that matches the state of the page. Users can copy this URL and use it as a link, for example, to create a bookmark, or to send it to other users for reference. Depending on your users, you might consider passing this information on to them. If you use your own custom theme, you can add this link to it.


CSA and SSA modes

The portal Web 2.0 theme also supports server-side aggregation (SSA) mode. In SSA mode, a full page refresh is performed to re-call the theme JSPs, and conventional JSP tag aggregation is performed. This useful in the following cases:


Forcing server side aggregation mode

You can force server side aggregation mode by the following methods:

Portlet deployment descriptor

To force server side aggregation for a portlet regardless of other conditions, add the following initialization parameter to the portlet.xml file for the portlet:
com.ibm.wps.web2.renderMode=force_SSA

Page parameter for forcing SSA

Set a page to be rendered in SSA mode by assigning and setting a page parameter named RenderMode = force_ssa.

You set this parameter by using the administration portlet Page Properties and editing the page properties. The portal Web 2.0 theme checks this parameter, and if you set it to RenderMode=force_ssa, it switches to SSA mode for this page. If the user navigates to a page that does not have this setting, the theme returns to CSA mode.

For some portal components this parameter is set to the value force_ssa by default.

For example, Web Content and Personalization are configured to enforced SSA mode. To have pages of these components rendered in CSA mode, remove the parameter RenderMode from the component page root.

Portlet blacklist

Alternately, there is a list of portlets that are known to be incompatible with the CSA aggregator. The Portal Web 2.0 theme checks the portlets on the current page against this blacklist, and if a match is found, SSA mode is forced. The blacklist is stored in a Javascript file in the theme /js/portletsForServerSideOnly.js.

To add a portlet to the blacklist, edit this file, and add the portlet definition UID to the list. The portlet definition UID is defined the portlet.xml descriptor in the portlet deployment Web application archive.

Custom programming

If you need more fine grained control over CSA and SSA rendering than is provided by the methods listed above, you can edit the theme to add your own custom logic. The PortalWeb2 theme sets a page variable named isSSA, and its opposite, isCSA in the file head_extras.jspf. These are boolean variables. They are used throughout the theme to allow it to render in either CSA or SSA mode. If there are other circumstances in which SSA mode is desired, edit head_extras.jspf and add the logic to the conditions that set these variables to true or false.
For example, if a portlet created using Google Web Toolkit does not function properly in the CSA mode of the portal Web 2.0 theme, you can force the server side aggregation mode by either setting the page parameter RenderMode = force_ssa or adding the portlet definition UID of that portlet to the portlet blacklist.

Once a page has been forced into SSA mode, for example by adding a blacklisted portlet, the page will remain in SSA mode for that browser session even if the user removes the portlet from the page. To make the page return to CSA mode, the user needs to close the browser window or delete the browser cookies. This behavior avoids unnecessary requests on subsequent views of an SSA-forced page in a single browsing session.


Parent topic:

Web 2.0 theme


Related concepts


Customize the Web 2.0 theme


Related reference


Differential page rendering