[jboss-user] [JBoss Portal] - Re: Problem with PortletSession
aspdeepak
do-not-reply at jboss.com
Tue May 5 03:06:05 EDT 2009
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#4228497
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4228497
More information about the jboss-user
mailing list