Hi all,

 

I’ve some problems with the restore view mechanism JSF provides. First of all I like to summarize what I think happens in this phase:

 

  • JSF tries to restore the component tree of the page that did the request….. this means:
    • You are on page P1, clicking on a link which redirects to P2, JSF does the following:
      • RESTORE_VIEW: Restore component tree of P1
      • RENDER_RESPONSE: Clear the UIViewRoot and set a new one, which contains components of P2
    • You are now on page P2, clicking on a link which redirects to P3, JSF does the following:
      • RESTORE_VIEW: Restore component tree of P2
      • RENDER_RESPONSE: … Create component tree of P3

 

I hope that’s correct ;). Please correct me if I’m wrong.

I want to know what happens in the following case:

 

  • A user was on P1, was on P2, and is now on P3 (as described above)…. Now the user uses the back button of the browser, and is on P2 again (The page has been retrieved from cache). Now the user clicks on another link, which redirects him to P4.
    • Here is what I think happens in the JSF phases in this case:
      • RESTORE_VIEW: Restore component tree of P2
      • RENDER_RESPONSE: Clear UIViewRoot and create new component tree of page P4

 

Here are my questions:

  • Is this correct?
  • How does JSF know which component tree to restore?
  • Is it possible to detect if a request comes from a cached page?
    • Is there something like a unique ID which gets written to every page, so that I can store them in the session and check if a page has already been submitted?

 

 

Thx in advance,

Dominik

Reply via email to