If the value can be modified after the page is initially rendered,
then it should have both a name "javax.faces.ViewState" and an
ID determined by the naming container hierarchy so that the following
works correctly:
<update id="javax.faces.ViewState"><![CDATA[-1470762710634119679:-9198324743075498445]]></update>
Or, javax.faces.ViewState should be handled as a special case, with
all forms from the same view updated together.
Ted.
On 2012-01-27, at 2:20 PM, Edward Burns wrote:
> If we care about XML correctness, we need to fix this old issue:
>
> http://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-220
>
> The spec [1] requires that the hidden field for the view state must have
> both a name and an id attribute, and that the value for both must be
> "javax.faces.ViewState". Naturally, this causes problems when you have
> multiple forms and want to me XML correct.
>
> Mojarra has long had a config param for this,
> com.sun.faces.enableViewStateIdRendering, which is on true by default,
> but I'm wondering if we can just modify the spec to remove the
> requirement to have an "id" attribute.
>
> ACTION: Please respond by mid week next week.
>
> Thanks,
>
> Ed
>
> [1] https://maven.java.net/service/local/repositories/snapshots/archive/javax/faces/javax.faces-api/2.2-SNAPSHOT/javax.faces-api-2.2-20120126.091957-54-javadoc.jar/!/javadocs/javax/faces/render/ResponseStateManager.html#VIEW_STATE_PARAM
> --
> | edward.burns_at_oracle.com | office: +1 407 458 0017
> | homepage: | http://ridingthecrest.com/