I'm little bit on shaky ground here as I haven't read the full source in this case, but if activate an action that causes you to navigate to a new page, then it first restores the old tree, processes your action, then creates a new page. So it both restores the old component tree, and then discards it to build a new one. There's a little speculation here, though, and this isn't an area where I'm confident of my knowledge. Things happen differently if there's a redirect, but I'm not exactly sure what the implementation details are, although the practical effects are that messages and saveState values (stored in the component tree) are lost.
On 8/13/06, william kanej <[EMAIL PROTECTED]> wrote:
Thanks Mike, You have said'Effectively yes to both, provided you're returning null from your action method, indicating that you are staying on the same JSF page.' Does this mean that if my action method returns a non null indicating that I need to navigate to a different page, the behavior of restore view is different? My understanding was that irrespective of the target navigation page restore view happens for the page that generated the request well before resolving the out come of application logic. Please let me know if my understanding is correct. Regards, William On 8/12/06, Mike Kienenberger <[EMAIL PROTECTED]> wrote: > On 8/12/06, william kanej <[EMAIL PROTECTED]> wrote: > > If page1.jp was rendered and a user submits a form in Page1,jsp, will view > > the tree that was used to render the response for Page1.jsp be retrieved by > > jsf upon in restore view stage or will a new view tree be created for the > > request? > > If view tree of that was used to render the response is retrieved instead of > > being created will each of the components in the view tree have the local > > state that was used to render Page1.jsp?Regrds > > Effectively yes to both, provided you're returning null from your > action method, indicating that you are staying on the same JSF page. > > It's possible that restoreState might create an identical tree with > identical state rather than reusing the same object (depends on the > implementation and whether you're using server-side state saving or > client-side state saving). But for end-user purposes, this tree is > identical. >

