[ http://issues.apache.org/jira/browse/TOMAHAWK-503?page=all ]

Mario Ivankovits resolved TOMAHAWK-503.
---------------------------------------

    Fix Version/s: 1.1.5-SNAPSHOT
       Resolution: Fixed

Hi!


I added a policy configuration to customize the data being saved between 
redirects


New context configuration parameters:

org.apache.myfaces.redirectTracker.MAX_REDIRECTS - Default: 20
Number of redirects to track - required to allow the back-button to work.


org.apache.myfaces.redirectTracker.POLICY - Default: 
org.apache.myfaces.custom.redirectTracker.policy.NoopRedirectTrackPolicy

The policy used to describe which data to save between requests. This can be 
any FQN to a class implementing the RedirectTrackerPolicy.

Current implementations are:
* org.apache.myfaces.custom.redirectTracker.policy.FullRedirectTrackPolicy
Captures request beans, local and messages
* org.apache.myfaces.custom.redirectTracker.policy.MessagesRedirectTrackPolicy
Captures FacesMessages only
* org.apache.myfaces.custom.redirectTracker.policy.NoopRedirectTrackPolicy
Captures nothing (the default for JSF backward compatiblity)

> 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
>             Fix For: 1.1.5-SNAPSHOT
>
>         Attachments: impl.diff, RedirectTracker.java, sandbox.patch, 
> sandbox2.patch, 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

        

Reply via email to