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

          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.
          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).

            People

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

              Dates

              • Created:
                Updated:
                Resolved: