How to reset JSF Portlets to initial state

For a JSF based portlet, if you have a scenario where a user is navigating between screens and that portlet is having 2 or 3 screens, if the user went to 3rd screen and he comes back and clicked on the link it is going to 3rd screen instead of 1st screen.

To render 1st jsp from within portlet,we specify init parameter for first jsp in portlet.xml as follows


Now in case, when you want to reset JSF Portlets to its initial view when user comes back, set "" attributed to session.

portletSession.setAttribute("", <path of jsp to render>);

No comments: