Uploaded image for project: 'PUBLIC - Liferay Faces'
  1. PUBLIC - Liferay Faces
  2. FACES-2665

Error in Spec requirement for preserving "scoped data" in Section 5.1.2, titled "Managing Lifecycle State"


    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: facesbridge-spec-1.0.0, facesbridge-spec-2.0.0
    • Fix Version/s: facesbridge-spec-5.0.0
    • Component/s: FacesBridge Spec
    • Labels:


      Section 5.1.2 of the JSR 329 Spec titled "Managing Lifecycle State" states:

      Specifically, the bridge must implement a notion of a "bridge request scope" (scoped data) that supplies the expected Faces semantics. This is done as follows:

      • Upon completion of each portlet action preserve the scoped data (described above) in a newly created bridge request scope if the action doesn't terminate because of a redirect or the navigational target of the action doesn't specify a portlet mode that differs from the current request.


      This can be represented by the following snippet from BridgePhaseActionImpl.java in the Liferay Faces Bridge Reference Implementation:

      if (!bridgeRequestScope.isRedirectOccurred() || !bridgeRequestScope.isPortletModeChanged()) {
      	maintainBridgeRequestScope(actionRequest, actionResponse,

      The problem in the Spec requirement should use the word "and" instead of "or".

      Rationale: If ExternalContext.redirect(String url) is called by the bridge due to the presence of a <redirect/> in a navigation-rule, then the bridge request scope must not be preserved into the render phase. Even if the PortletMode is the same, the bridge request scope must not be preserved when a redirect occurs.

      Note that redirectActionTest and requestNoScopeOnRedirectTest in Bridge TCK have the correct understanding. In other words, the Bridge TCK assumes "and" and not "or" which means that the Spec language must be in error.




            • Votes:
              0 Vote for this issue
              2 Start watching this issue


              • Created:


                Version Package