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 ]
          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)}}.
          Mircea Toma made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          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: