ICEfaces
  1. ICEfaces
  2. ICE-2823

View ID is modified during the JSF lifecycle when using Facelets

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 1.7Beta1
    • Fix Version/s: 1.7RC1, 1.7
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      Facelets

      Description

      When navigating in an ICEfaces application that uses Facelets, the view id is altered during the render phase. This is different behaviour than when using JSPs. Below is the output from a PhaseListener that shows the view id during page navigation from one page to another. The Facelets version shows the view id being altered (the extension is changed from .iface to .jspx) where the JSP version does not.

      JSP (i.e. without Facelets)

      Page 1
      before RESTORE_VIEW 1 com.icesoft.faces.context.BridgeFacesContext@e03bd6 com.icesoft.faces.application.D2DViewHandler$1@18f37c /headAndNav.iface
      after RESTORE_VIEW 1 com.icesoft.faces.context.BridgeFacesContext@e03bd6 com.icesoft.faces.application.D2DViewHandler$1@18f37c /headAndNav.iface
      before RESTORE_VIEW 1 com.icesoft.faces.context.BridgeFacesContext@e03bd6 null
      after RESTORE_VIEW 1 com.icesoft.faces.context.BridgeFacesContext@e03bd6 com.icesoft.faces.application.D2DViewHandler$1@18f37c /headAndNav.iface
      before RENDER_RESPONSE 6 com.icesoft.faces.context.BridgeFacesContext@e03bd6 com.icesoft.faces.application.D2DViewHandler$1@18f37c /headAndNav.iface
      after RENDER_RESPONSE 6 com.icesoft.faces.context.BridgeFacesContext@e03bd6 com.icesoft.faces.application.D2DViewHandler$1@18f37c /headAndNav.iface

      Page 2
      before RESTORE_VIEW 1 com.icesoft.faces.context.BridgeFacesContext@e03bd6 com.icesoft.faces.application.D2DViewHandler$1@18f37c /headAndNav.iface
      after RESTORE_VIEW 1 com.icesoft.faces.context.BridgeFacesContext@e03bd6 com.icesoft.faces.application.D2DViewHandler$1@18f37c /headAndNav.iface
      before APPLY_REQUEST_VALUES 2 com.icesoft.faces.context.BridgeFacesContext@e03bd6 com.icesoft.faces.application.D2DViewHandler$1@18f37c /headAndNav.iface
      after APPLY_REQUEST_VALUES 2 com.icesoft.faces.context.BridgeFacesContext@e03bd6 com.icesoft.faces.application.D2DViewHandler$1@18f37c /headAndNav.iface
      before PROCESS_VALIDATIONS 3 com.icesoft.faces.context.BridgeFacesContext@e03bd6 com.icesoft.faces.application.D2DViewHandler$1@18f37c /headAndNav.iface
      after PROCESS_VALIDATIONS 3 com.icesoft.faces.context.BridgeFacesContext@e03bd6 com.icesoft.faces.application.D2DViewHandler$1@18f37c /headAndNav.iface
      before UPDATE_MODEL_VALUES 4 com.icesoft.faces.context.BridgeFacesContext@e03bd6 com.icesoft.faces.application.D2DViewHandler$1@18f37c /headAndNav.iface
      after UPDATE_MODEL_VALUES 4 com.icesoft.faces.context.BridgeFacesContext@e03bd6 com.icesoft.faces.application.D2DViewHandler$1@18f37c /headAndNav.iface
      before INVOKE_APPLICATION 5 com.icesoft.faces.context.BridgeFacesContext@e03bd6 com.icesoft.faces.application.D2DViewHandler$1@18f37c /headAndNav.iface
      after INVOKE_APPLICATION 5 com.icesoft.faces.context.BridgeFacesContext@e03bd6 com.icesoft.faces.application.D2DViewHandler$1@18f37c /headAndNav.iface
      before RESTORE_VIEW 1 com.icesoft.faces.context.BridgeFacesContext@7b8cf0 null
      after RESTORE_VIEW 1 com.icesoft.faces.context.BridgeFacesContext@7b8cf0 com.icesoft.faces.application.D2DViewHandler$1@2ac22a /headAndNav01.iface
      before RENDER_RESPONSE 6 com.icesoft.faces.context.BridgeFacesContext@7b8cf0 com.icesoft.faces.application.D2DViewHandler$1@2ac22a /headAndNav01.iface
      after RENDER_RESPONSE 6 com.icesoft.faces.context.BridgeFacesContext@7b8cf0 com.icesoft.faces.application.D2DViewHandler$1@2ac22a /headAndNav01.iface



      Facelets

      Page 1
      before RESTORE_VIEW 1 com.icesoft.faces.context.BridgeFacesContext@8b4ce9 null
      after RESTORE_VIEW 1 com.icesoft.faces.context.BridgeFacesContext@8b4ce9 com.icesoft.faces.application.D2DViewHandler$1@91762 /headAndNav.iface
      before RENDER_RESPONSE 6 com.icesoft.faces.context.BridgeFacesContext@8b4ce9 com.icesoft.faces.application.D2DViewHandler$1@91762 /headAndNav.iface
      after RENDER_RESPONSE 6 com.icesoft.faces.context.BridgeFacesContext@8b4ce9 com.icesoft.faces.application.D2DViewHandler$1@91762 /headAndNav.jspx

      Page 2
      before RESTORE_VIEW 1 com.icesoft.faces.context.BridgeFacesContext@8b4ce9 com.icesoft.faces.application.D2DViewHandler$1@91762 /headAndNav.jspx
      after RESTORE_VIEW 1 com.icesoft.faces.context.BridgeFacesContext@8b4ce9 com.icesoft.faces.application.D2DViewHandler$1@91762 /headAndNav.jspx
      before APPLY_REQUEST_VALUES 2 com.icesoft.faces.context.BridgeFacesContext@8b4ce9 com.icesoft.faces.application.D2DViewHandler$1@91762 /headAndNav.jspx
      after APPLY_REQUEST_VALUES 2 com.icesoft.faces.context.BridgeFacesContext@8b4ce9 com.icesoft.faces.application.D2DViewHandler$1@91762 /headAndNav.jspx
      before PROCESS_VALIDATIONS 3 com.icesoft.faces.context.BridgeFacesContext@8b4ce9 com.icesoft.faces.application.D2DViewHandler$1@91762 /headAndNav.jspx
      after PROCESS_VALIDATIONS 3 com.icesoft.faces.context.BridgeFacesContext@8b4ce9 com.icesoft.faces.application.D2DViewHandler$1@91762 /headAndNav.jspx
      before UPDATE_MODEL_VALUES 4 com.icesoft.faces.context.BridgeFacesContext@8b4ce9 com.icesoft.faces.application.D2DViewHandler$1@91762 /headAndNav.jspx
      after UPDATE_MODEL_VALUES 4 com.icesoft.faces.context.BridgeFacesContext@8b4ce9 com.icesoft.faces.application.D2DViewHandler$1@91762 /headAndNav.jspx
      before INVOKE_APPLICATION 5 com.icesoft.faces.context.BridgeFacesContext@8b4ce9 com.icesoft.faces.application.D2DViewHandler$1@91762 /headAndNav.jspx
      after INVOKE_APPLICATION 5 com.icesoft.faces.context.BridgeFacesContext@8b4ce9 com.icesoft.faces.application.D2DViewHandler$1@91762 /headAndNav.jspx
      before RESTORE_VIEW 1 com.icesoft.faces.context.BridgeFacesContext@80f3a4 null
      after RESTORE_VIEW 1 com.icesoft.faces.context.BridgeFacesContext@80f3a4 com.icesoft.faces.application.D2DViewHandler$1@b532e /headAndNav01.iface
      before RENDER_RESPONSE 6 com.icesoft.faces.context.BridgeFacesContext@80f3a4 com.icesoft.faces.application.D2DViewHandler$1@b532e /headAndNav01.iface
      after RENDER_RESPONSE 6 com.icesoft.faces.context.BridgeFacesContext@80f3a4 com.icesoft.faces.application.D2DViewHandler$1@b532e /headAndNav01.jspx

        Activity

        Hide
        Deryk Sinotte added a comment -

        I'm attaching a .zip file that contains a pre-built war and source code. It uses Facelets and has a PhaseListener and is built to run on Tomcat 6.

        Show
        Deryk Sinotte added a comment - I'm attaching a .zip file that contains a pre-built war and source code. It uses Facelets and has a PhaseListener and is built to run on Tomcat 6.
        Hide
        Mark Collette added a comment -

        Subversion 15959
        icefaces\core\src\com\icesoft\faces\facelets\D2DFaceletViewHandler.java

        Show
        Mark Collette added a comment - Subversion 15959 icefaces\core\src\com\icesoft\faces\facelets\D2DFaceletViewHandler.java
        Hide
        Mark Collette added a comment -

        Now this should work properly for both JSP and Facelets. In the previous release, the ICEfaces Facelets ViewHandler would change the viewId from the URL to the underlying file in the Render phase, when it's supposed to be done, and is now done, in the RestoreView phase.

        Subversion 16023
        icefaces\core\src\com\icesoft\faces\application\D2DViewHandler.java
        icefaces\core\src\com\icesoft\faces\facelets\D2DFaceletViewHandler.java

        Show
        Mark Collette added a comment - Now this should work properly for both JSP and Facelets. In the previous release, the ICEfaces Facelets ViewHandler would change the viewId from the URL to the underlying file in the Render phase, when it's supposed to be done, and is now done, in the RestoreView phase. Subversion 16023 icefaces\core\src\com\icesoft\faces\application\D2DViewHandler.java icefaces\core\src\com\icesoft\faces\facelets\D2DFaceletViewHandler.java
        Hide
        Mark Collette added a comment -

        This is as per the JSF 1.2 spec.

        Show
        Mark Collette added a comment - This is as per the JSF 1.2 spec.

          People

          • Assignee:
            Unassigned
            Reporter:
            Deryk Sinotte
          • Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: