Resetting a JSF Backing bean from theme navigation menu in WPS 7.0
-
25-06-2021 - |
Question
I have a JSF Portlet which has user form in the view JSP. The requirement is whenever i click on the theme navigation menu, a new form needs to be displayed to the user. But the problem is whenever i click on the menu, the values are getting retained. Please suggest how to the remove/re-initialize the backing bean on click of theme navigation.
Thanks, Raj
Solution
I did a workaround by adding a queryString parameter to the navigation URL generation (since we are using custome themes) and in my doView i am checking for the parameter and if its not NULL, then display a fresh form. Hope it helps
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow