Uploaded image for project: 'MyFaces Core'
  1. MyFaces Core
  2. MYFACES-3563 Improvements in State Saving Algorithm
  3. MYFACES-3564

[perf] remove viewId sent inside token in HtmlResponseStateManager

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.0.15, 2.1.9
    • JSR-314
    • None

    Description

      The current default implementation of HtmlResponseStateManager sends the viewId inside the token for server side state saving and client side state saving, but it is just useless information, because it is not used in any way.

      Instead, JSF 2.0 spec defines that the viewId is derived in RestoreViewPhase from the url, following a specified set of rules (see restoreViewSupport.calculateViewId() ).

      In server side state saving the viewId is used as part of the key used to restore the state from session map, which is reasonable.

      The proposed change involves do not add this information into the token, because it is useless. Anyway, in client side state saving it has sense to send the viewId or some similar information into the state, and include a logic to check if the viewId match with the calculated viewId, to ensure the state can be applied to the expected view.

      Attachments

        Activity

          People

            lu4242 Leonardo Uribe
            lu4242 Leonardo Uribe
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: