Get your CodeRanch badge!*
The moose likes JSF and the fly likes JSF and Facelets -- Restore View on HTTP GET Method Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "JSF and Facelets -- Restore View on HTTP GET Method " Watch "JSF and Facelets -- Restore View on HTTP GET Method " New topic
Author

JSF and Facelets -- Restore View on HTTP GET Method

Ronald Depew
Greenhorn

Joined: Apr 26, 2006
Posts: 6
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.

What workable recommendations do you have?

I appreciate input,

Ron Depew

Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15632
    
  15

I think you're basically just repeating this thread. http://www.coderanch.com/t/509950/JSF/java/JSF-Capture-Target-View-ID

Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JSF and Facelets -- Restore View on HTTP GET Method
 
Similar Threads
JSF phaseListener
JSF -- Capture Target View ID after FORWARD by Navigation Handler
Going back to previous page
Not Session Timeout, but throw javax.faces.application.ViewExpiredException
why the same URL shows different page in JSF