The only time frame where views are stored is between a RENDER_RESPONSE end (the view is serialized) and the RESTORE_VIEW of next request. At the end of that request there is a new RENDER_RESPONSE phase and a new view is created, so you are *almost* right. Views are stored but not used at all except for the 'back button' issue. If you press the back button one or some times, the view restored after submit in RESTORE_VIEW phase is not the last view stored, but the corresponding to that submit (the right view to restore is located by a 'jsf_sequence' hidden parameter).

Savestate stores an object in view in time between RENDER_RESPONSE and next RESTORE_VIEW. This is the way an object is *maintained* between requests.

So answering your questions, yes, navigating to a view ( as a consequence of JSF navigation) doesn´t restore its previous state, creates a new one.

Ricardo.

On 9/5/06, Ulrich Teichert <[EMAIL PROTECTED]> wrote:
Hi,

> I think you have a concept mistake. When you come back from one page to
> another, a complete faces cycle is executed. Thus, the RENDER_VIEW IS
> executed and a new view is created. You can think the previous stored page
> is restored, but that's not true. If you use x:savestate you can store
> from
> a single attribute to a complete view (mostly data values) but in restore
> view phase a complete new view is created (a new component tree). Then,
> you
> must recreate the dynamic components or store it and restore manually
> (savestate or another custom component storage).

Ah, that would explain the behaviour. So, every time I leave a view, that
one is destroyed *completely* and re-entering it does not lead to calls to
restoreState, right? I am a bit confused, because when leaving the view
I can see calls to saveState and that means that this data will not be
used then.

Thanks,
Uli
--
Ulrich Teichert
Stormweg 24
24539 Neumünster, Germany


Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer

Reply via email to