You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Werner Punz <we...@gmail.com> on 2007/02/06 20:10:20 UTC

Re: [Myfaces] how to sync t:saveState with refreshed restore_view phase

Renzo Tomaselli schrieb:
> Oh well - in case anybody is interested - I found a solution: view and
> savedState can go out of sync simply because savedState might contain an
> obj to be serialized, coming from a bean property.
> In this case it appears that this obj is shared among any number of
> saved state, even if they belong to different requests.
> I use Trinidad with client state saving, which means that every page
> contains a token, pointing to a session-bound serialized state. Multiple
> requests imply multiple tokens, but they share the same copy of a
> non-atomic serialized object. If this changes, then modifications appear
> retrofitted to other state in cache, usually concerning previous
> request/pages.  If any related token is chosen because of browser
> refresh, then view and state might go out of sync.
> 
Ok, thanks for the explanation, btw. I also wanted to note
saveState has its limits, it relies on the save and restore
mechanisms of jsf, which basically were used for
savestating the control behavior over multiple events.

If you need something more extensive which also does not
require you to drag along tags in every page
there are multiple dialog frameworks available.
Tomahawk has the scope control in the sandbox
(currently moved into spring)
Then there is shale dialog, Seam, and also Trinidad has something along
the lines of a dialog Framework.

All of those allow real scoping with defined beginning and end conditions.
Downside is, that you might lose some of the back button behavior you
need or have to take care yourself.