Wednesday, 21 September 2011

how do i pass data from action phase ( processAction ( ) ) to render phase ( render ( ) ) ?

javax.portlet.actionScopedRequestAttributes which is set to false by default, but if you set its value to true then you can set request attribute in the processAction (  ) method and you should be able to access those request attributes in the render (  ) method.

One drawback of this approach is the request attributes are stored in PortletSession under the hood and it has performance implications of storing data in portlet session,

but positive side this approach is better than storing and removing objects in session by yourself.
Source code

What is PortletSession interface?

User identification across many requests and transient information storage about the user is processed by PortletSession interace. One PortletSession is created per portlet application per client. The PortletSession interface provides a way to identify a user across more than one request and to store transient information about that user. The storing of information is defined in two scopes- APPLICATION_SCOPE and PORTLET_SCOPE.

APPLICATION_SCOPE: All the objects in the session are available to all portlets,servlets, JSPs of the same portlet application, by using APPLICATION_SCOPE.

PORTLET_SCOPE: All the objects in the session are available to the portlet during the requests for the same portlet window. The attributes persisted in the PORTLET_SCOPE are not protected from other web components.

authoring template

An authoring template determines the design of a content form, defines what fields and elements appear on a content form and specifies default values for fields and elements.

An authoring template is used to define the default authoring settings for site areas and content items. 

Enabling automatic JSP reloading?

To view changes to your theme and skins JSPs without restarting the portal server, you can force the application server to automatically check for new versions of JSPs.

1. Open the file was_profile_root/config/cells/cell_name/applications/wps.ear/deployments/wps/wps.war /WEB-INF/ibm-web-ext.xmi

2. Change the value for reloadingEnabled from false to true.

3. Save the file.

4. Restart the portal server

What is Portlet Skin ?

The term skin refers to the visual appearance of the area surrounding an individual portlet. Each portlet can have its own skin. The skins that are available for use with a portlet are defined by the portal theme that is associated with the page. The portal administrator or the designer determines the theme for pages and the available skins for the theme. The administrator can permit specified users to change the skins to reflect individual preferences.

How do I Improve Portal Page Rendering Performance?

1. in cmd, goto  wp_profile \ ConfigEngine

2. ConfigEngine.bat precompile-jsp DWasUser=wpsadmin DWasPassword=wpsadmin

Redirect to login page after session timeout?

In the WAS Admin Console:
1. Go to "Resources > Resource Environment Providers > WPproperties" and add the following two new custom prope

a. name :redirect.logout.url
    value: /wps/portal
b. name :redirect.logout
    value: true type java.lang.String

2. Then apply and save the changes, and restart portal.