This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
JSF and Facelets -- Restore View on HTTP GET Method
Ronald Depew
Greenhorn
Joined: Apr 26, 2006
Posts: 6
posted
0
I'm attempting to design a Breadcrumbs component, such that perviously visited JSF Facelets pages can be restored upon clicking a standard href link on the Facelet page. The backing beans will have session scope.
In a Post-RestoreView Phase Listener upon receipt of a GET from links created by my component, I’m wondering whether I will need to 1) Get the ViewID from the parameter of the HTTPServletRequest and 2) get the StateManager from the Application and call restoreView() on the StateManager.object. Will this work, or will I have issues with a null View Id?
Conversely, It would be great if I only needed to get the ViewID from FacesContext and trust the JSF Servlet to restore the view automatically for me, even though the a non-postback is issued.