Understand conditions for which Portal will use Server Side Aggregation

The PortalWeb2 or the Client Side Aggregation theme is implemented in such a way that it can either aggregate the full page on the server using traditional JSP tags, which is similar to the Serve side aggregation theme. Or second option is that it sends only place holders for main elements such as top navigation, side navigation, portal body in the first page load. Once the page is loaded the Client Side Aggregator (It is written in JavaScript) gets control. It makes request to REST service for each of the page fragments and assembles the page on the client side.

Even when you apply CSA theme to a page there could be cases where you want the full page to be aggregated on the server side.

  • Some pages are incompatible with CSA

  • Portlets are not compatible with CSA

  • Browser might not have sufficient capabilities for CSA



You can force the Server side aggregation by using one of the following methods

  • Adding com.ibm.wps.web2.renderMode=force_SSA initialization parameter in portlet.xml. Once you mark a portlet as server side aggregation only, clicking on one of its link will result in full page refresh

  • You can blacklist particular portlet by adding "portlet_app_id": true to true in WebSphere\wp_profile\installedApps\sunpa\wps.ear\wps.war\themes\html\PortalWeb2\js\portletsForServerSideOnly.js file. If you open this file you will find name of the portlets that are shipped with IBM WPS.

  • You can set a page to be rendered in SSA mode by assigning and setting a page parameter named RenderMode = force_ssa.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. If you want to have pages of these components rendered in CSA mode, remove the parameter RenderMode from the component page root.

  • 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.

No comments: