Thejaswini
Thejaswini

Reputation: 11

How to reset JSF Portlets to welcome page always

We are developing JSF IBM Portlets. User will be navigating to the screens. Suppose If a portlet is having 2 or 3 screens, if the user went to 3rd screen, he cameback and clicked on the link it is going to 3rd screen instead of 1st screen.

How can I reset my JSF Portlets to its initial view when the users cameback?

Upvotes: 0

Views: 167

Answers (1)

Crosstalk22
Crosstalk22

Reputation: 377

So in websphere portal, with jsf portlets, the state is saved in the session/url, so you will need to override the state like Now in case, when you want to reset JSF Portlets to its initial view when user comes back, set "com.ibm.faces.portlet.page.view" attributed to session.

portletSession.setAttribute("com.ibm.faces.portlet.page.view", );

See here http://extremeportal.blogspot.com/2011/10/how-to-reset-jsf-portlets-to-initial.html

also in the whitepaper I wrote ftp://public.dhe.ibm.com/software/dw/lotus/ResettingPortalPortletViews.pdf . It all depends if you are using session or render parameters to save the state, if render params you can generate a url to the page that has the portlet on it with keep navigation state false(described in the whitepaper)

Upvotes: 1

Related Questions