ICEfaces
  1. ICEfaces
  2. ICE-9680

DOMPartialViewContext.renderState() does not conform to JSF 2.2 Spec regarding javax.faces.ViewState

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.3
    • Fix Version/s: 4.0.BETA, 4.0
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      JSF 2.2 Portlet Bridge
    • Assignee Priority:
      P2

      Description

      The following code in DOMPartialViewContext is not rendering the "id" of the <update> element correctly for JSF 2.2:

      {code}
          private void renderState() throws IOException {
              // Get the view state and write it to the response..
              PartialResponseWriter writer = getPartialResponseWriter();
              writer.startUpdate(PartialResponseWriter.VIEW_STATE_MARKER);
              String state = facesContext.getApplication().getStateManager().getViewState(facesContext);
              writer.write(state);
              writer.endUpdate();
          }
      {code}

      The "id" of the update should be namespaced like this:

      {code}
      <partial-response>
      <changes>
      <update id="A4673:javax.faces.ViewState:0">
      <![CDATA[4212726618426443884:8310815191568508735]]>
      </update>
      </changes>
      </partial-response>
      {code}

      But instead, it looks like this:

      {code}
      <partial-response>
      <changes>
      <update id="A4673:javax.faces.ViewState:0">
      <![CDATA[4212726618426443884:8310815191568508735]]>
      </update>
      </changes>
      </partial-response>
      {code}

      In order to see how Mojarra does it, please refer to {{com.sun.faces.context.PartialViewContextImpl.renderState(FacesContext)}} and {{com.sun.faces.util.Util.getViewStateId(FacesContext)}}.

        Issue Links

          Activity

          Neil Griffin created issue -
          Neil Griffin made changes -
          Field Original Value New Value
          Link This issue blocks ICE-7768 [ ICE-7768 ]
          Ken Fyten made changes -
          Fix Version/s 4.0 [ 10770 ]
          Hide
          Ken Fyten added a comment -

          Thanks for logging this JIRA Neil. Targeted for ICEfaces 4.0, which is our JSF 2.2 supporting release.

          Show
          Ken Fyten added a comment - Thanks for logging this JIRA Neil. Targeted for ICEfaces 4.0, which is our JSF 2.2 supporting release.
          Ken Fyten made changes -
          Assignee Mircea Toma [ mircea.toma ]
          Assignee Priority P2 [ 10011 ]
          Mircea Toma made changes -
          Description The following code in DOMPartialViewContext is not rendering the "id" of the <update> element correctly for JSF 2.2:

          {code}
              private void renderState() throws IOException {
                  // Get the view state and write it to the response..
                  PartialResponseWriter writer = getPartialResponseWriter();
                  writer.startUpdate(PartialResponseWriter.VIEW_STATE_MARKER);
                  String state = facesContext.getApplication().getStateManager().getViewState(facesContext);
                  writer.write(state);
                  writer.endUpdate();
              }
          {code}

          The "id" of the update should be namespaced like this:

          {code}
          <partial-response>
          <changes>
          <update id="A4673:javax.faces.ViewState:0">
          <![CDATA[4212726618426443884:8310815191568508735]]>
          </update>
          </changes>
          </partial-response>
          {code}

          But instead, it looks like this:

          {code}
          <partial-response>
          <changes>
          <update id="A4673:javax.faces.ViewState:0">
          <![CDATA[4212726618426443884:8310815191568508735]]>
          </update>
          </changes>
          </partial-response>
          {code}

          In order to see how Mojarra does it, please refer to {{com.sun.faces.context.PartialViewContextImpl.renderState(FacesContext)}} and {{com.sun.faces.util.Util.getViewStateId(FacesContext)}}.
          The following code in DOMPartialViewContext is not rendering the "id" of the <update> element correctly for JSF 2.2:

          {code}

              private void renderState() throws IOException {
                  // Get the view state and write it to the response..
                  PartialResponseWriter writer = getPartialResponseWriter();
                  writer.startUpdate(PartialResponseWriter.VIEW_STATE_MARKER);
                  String state = facesContext.getApplication().getStateManager().getViewState(facesContext);
                  writer.write(state);
                  writer.endUpdate();
              }

          {code}

          The "id" of the update should be namespaced like this:

          {code}
          <partial-response>
          <changes>
          <update id="A4673:javax.faces.ViewState:0">
          <![CDATA[4212726618426443884:8310815191568508735]]>
          </update>
          </changes>
          </partial-response>
          {code}

          But instead, it looks like this:

          {code}
          <partial-response>
          <changes>
          <update id="A4673:javax.faces.ViewState:0">
          <![CDATA[4212726618426443884:8310815191568508735]]>
          </update>
          </changes>
          </partial-response>
          {code}

          In order to see how Mojarra does it, please refer to {{com.sun.faces.context.PartialViewContextImpl.renderState(FacesContext)}} and {{com.sun.faces.util.Util.getViewStateId(FacesContext)}}.
          Mircea Toma made changes -
          Description The following code in DOMPartialViewContext is not rendering the "id" of the <update> element correctly for JSF 2.2:

          {code}

              private void renderState() throws IOException {
                  // Get the view state and write it to the response..
                  PartialResponseWriter writer = getPartialResponseWriter();
                  writer.startUpdate(PartialResponseWriter.VIEW_STATE_MARKER);
                  String state = facesContext.getApplication().getStateManager().getViewState(facesContext);
                  writer.write(state);
                  writer.endUpdate();
              }

          {code}

          The "id" of the update should be namespaced like this:

          {code}
          <partial-response>
          <changes>
          <update id="A4673:javax.faces.ViewState:0">
          <![CDATA[4212726618426443884:8310815191568508735]]>
          </update>
          </changes>
          </partial-response>
          {code}

          But instead, it looks like this:

          {code}
          <partial-response>
          <changes>
          <update id="A4673:javax.faces.ViewState:0">
          <![CDATA[4212726618426443884:8310815191568508735]]>
          </update>
          </changes>
          </partial-response>
          {code}

          In order to see how Mojarra does it, please refer to {{com.sun.faces.context.PartialViewContextImpl.renderState(FacesContext)}} and {{com.sun.faces.util.Util.getViewStateId(FacesContext)}}.
          The following code in DOMPartialViewContext is not rendering the "id" of the <update> element correctly for JSF 2.2:

          {code}
              private void renderState() throws IOException {
                  // Get the view state and write it to the response..
                  PartialResponseWriter writer = getPartialResponseWriter();
                  writer.startUpdate(PartialResponseWriter.VIEW_STATE_MARKER);
                  String state = facesContext.getApplication().getStateManager().getViewState(facesContext);
                  writer.write(state);
                  writer.endUpdate();
              }
          {code}

          The "id" of the update should be namespaced like this:

          {code}
          <partial-response>
          <changes>
          <update id="A4673:javax.faces.ViewState:0">
          <![CDATA[4212726618426443884:8310815191568508735]]>
          </update>
          </changes>
          </partial-response>
          {code}

          But instead, it looks like this:

          {code}
          <partial-response>
          <changes>
          <update id="A4673:javax.faces.ViewState:0">
          <![CDATA[4212726618426443884:8310815191568508735]]>
          </update>
          </changes>
          </partial-response>
          {code}

          In order to see how Mojarra does it, please refer to {{com.sun.faces.context.PartialViewContextImpl.renderState(FacesContext)}} and {{com.sun.faces.util.Util.getViewStateId(FacesContext)}}.
          Hide
          Mircea Toma added a comment -

          What exactly is different in the way the state key update is constructed? I do not see any difference between Mojarra and ICEfaces.

          Show
          Mircea Toma added a comment - What exactly is different in the way the state key update is constructed? I do not see any difference between Mojarra and ICEfaces.
          Hide
          Neil Griffin added a comment -

          Sorry I made a typo in the "description" field of this ticket. The ICEfaces one looks like this:

           
          <partial-response> 
          <changes> 
          <update id="javax.faces.ViewState"> 
          <![CDATA[4212726618426443884:8310815191568508735]]> 
          </update> 
          </changes> 
          </partial-response> 
          
          Show
          Neil Griffin added a comment - Sorry I made a typo in the "description" field of this ticket. The ICEfaces one looks like this: <partial-response> <changes> <update id= "javax.faces.ViewState" > <![CDATA[4212726618426443884:8310815191568508735]]> </update> </changes> </partial-response>
          Hide
          Mircea Toma added a comment -

          Modified DOMPartialViewContext.renderState to generate view state key updates that match the format Mojarra 2.2 generates in a portal environment (as well as in servlet environment).

          Show
          Mircea Toma added a comment - Modified DOMPartialViewContext.renderState to generate view state key updates that match the format Mojarra 2.2 generates in a portal environment (as well as in servlet environment).
          Mircea Toma made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #39266 Tue Dec 10 11:22:03 MST 2013 mircea.toma ICE-9680 Modified DOMPartialViewContext.renderState to generate view state key updates that match the format Mojarra 2.2 generates in a portal environment (as well as in servlet environment).
          Files Changed
          Commit graph MODIFY /icefaces4/trunk/icefaces/core/src/main/java/org/icefaces/impl/context/DOMPartialViewContext.java
          Ken Fyten made changes -
          Fix Version/s 4.0 [ 11382 ]
          Ken Fyten made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

            People

            • Assignee:
              Mircea Toma
              Reporter:
              Neil Griffin
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: