You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Hendrik Ebel (JIRA)" <de...@myfaces.apache.org> on 2006/08/25 12:10:23 UTC

[jira] Commented: (TOMAHAWK-503) Capture and restore saveState Beans and messages when using redirect navigation rule

    [ http://issues.apache.org/jira/browse/TOMAHAWK-503?page=comments#action_12430461 ] 
            
Hendrik Ebel commented on TOMAHAWK-503:
---------------------------------------

Thanks for this proposal, it's very useful!

But I have found a little bug in the sandbox code: after 10 requests no restore will be executed. This problem can by solved with usage of

String mapKey = Long.toString(rtid);

instead of

String mapKey = Long.toString(rtid, Character.MAX_RADIX);

in RedirectTrackerManager.trackRedirect(...)

> Capture and restore saveState Beans and messages when using redirect navigation rule
> ------------------------------------------------------------------------------------
>
>                 Key: TOMAHAWK-503
>                 URL: http://issues.apache.org/jira/browse/TOMAHAWK-503
>             Project: MyFaces Tomahawk
>          Issue Type: Improvement
>    Affects Versions: 1.1.5-SNAPSHOT
>            Reporter: Mario Ivankovits
>         Assigned To: Mario Ivankovits
>         Attachments: impl.diff, RedirectTracker.java, tom.diff
>
>
> Ok, this is a try to get what is described in the summary.
> The heart of this patch is the RedirectTracker.
> How it works:
> *) In NavigationHandlerImpl when it comes to the redirect the RedirectTracker will capture all required (save-state beans/messages) data. The tracker appends a special parameter (_rtid=) to the redirect url so the saved state can be looked up in an map.
> *) In LifeCycleImpl in restoreView the RedirectTracker will check for the special parameter and lookup the map using its value. If an entry was found the data will be restored.
> *) In UISaveState every bean rematerialized in restoreState will put it in a request-scoped map
> Known limitations:
> *) need to make the number of tracked redirects configureable (back-button) currently its hard-coded to 20
> *) some, as I didnt tested it very well
> I added this patch as a base to discuss what could be made better, though the goal is to add this functionality to myFaces.
> I hope some else jump in and we get a vital discussion about this topic.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira