I some how found that there is an inconsistent (may be) behavior of PortletSession
attributes, since the stored values vanishes after page rendering.
To be more precise the values become null after the page refreshes, I don't know
whether this is a bug.
But I started using PortalSession object for storing the information
My new implementation
| String isFirst =(String)
Navigation.getPortalRuntimeContext().getSession().getAttribute(IS_FIRST_LOAD);
| log.info(" IS_FIRST_LOAD (before) = "+isFirst+" for
user["+request.getUserPrincipal()+"]");
|
| if ( isFirst == null) { // if this is the first time loading
|
Navigation.getPortalRuntimeContext().getSession().setAttribute(IS_FIRST_LOAD,"false");
| log.info(" showing the default charts(COLLECTION since IS_FIRST_LOAD
)");
| log.info(" IS_FIRST_LOAD (after) =
"+Navigation.getPortalRuntimeContext().getSession().getAttribute(IS_FIRST_LOAD));
|
|
.............................................................
|
|
.............................................................
| }
|
Here
Navigation.getPortalRuntimeContext().getSession()
returns the PortalSession
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4228497#...
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&a...