MyFaces Tomahawk
  1. MyFaces Tomahawk
  2. TOMAHAWK-503

Capture and restore saveState Beans and messages when using redirect navigation rule

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.1.5-SNAPSHOT
    • Fix Version/s: 1.1.5
    • Component/s: None
    • Labels:
      None

      Description

      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.

      1. myfaces-extension.zip
        5 kB
        Kevin Galligan
      2. sandbox2.patch
        4 kB
        Kevin Galligan
      3. sandbox.patch
        3 kB
        Kevin Galligan
      4. RedirectTracker.java
        6 kB
        Mario Ivankovits
      5. tom.diff
        2 kB
        Mario Ivankovits
      6. impl.diff
        35 kB
        Mario Ivankovits

        Issue Links

          Activity

            People

            • Assignee:
              Mario Ivankovits
              Reporter:
              Mario Ivankovits
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development