Retaining the State of a Portlet
How to store the state of the portlet when the user logs out.
I have written a custome method to store the state of the portlet in the portletpreferences when the user logs out and tried to use response.setWindowState(getStateFromPreferences(PortletRequest)) to retain the portlet when the user logs in.
As the jsr168's RenderResponse does'nt support the method setWindowState(), I could'nt call the method in the doView().
But initially when the portlet gets rendered it will be calling doView() not the processAction().
But here my project demands to retain the state of the portlet(ie the recent state) when the user logs in.
Please give your views as to how it can be done.
Re: Retaining the State of a Portlet
I found out the solution for this.
what all we need to do is to change a value of the attribute in the WP_Root/shared/app/config/services/ConfigService.properties .
ie persistent.session.level=0 //initially it will be 0
when you change it to 1 Portal Server will be able to retain the state of the portlet
when you change it to 2 Portal Server will be able to retain the state as well as the page the user has visited before logging out.
Certified for WebSphere Portal Development