jsr344-experts@javaserverfaces-spec-public.java.net

[jsr344-experts] Re: [220-ViewStateParamNameOnly] PROPOSAL

From: Edward Burns <edward.burns_at_oracle.com>
Date: Tue, 31 Jan 2012 11:57:51 -0800

>>>>> On Mon, 30 Jan 2012 08:46:08 -0700, Ted Goddard <ted.goddard_at_icesoft.com> said:

TG> If the value can be modified after the page is initially rendered,
TG> then it should have both a name "javax.faces.ViewState" and an
TG> ID determined by the naming container hierarchy so that the following
TG> works correctly:

TG> <update id="javax.faces.ViewState"><![CDATA[-1470762710634119679:-9198324743075498445]]></update>

TG> Or, javax.faces.ViewState should be handled as a special case, with
TG> all forms from the same view updated together.

Let me clarify. It is certainly the case that all the forms in the page
will have the same value for the ViewState. Note that in the ajax XML
transport, we still use "id" and not name. This change only impacts the
hidden field.

NG> +1 for Ted's first suggestion: Keep the ID attribute, and take it
NG> one step further by prepending the naming container hierarchy (all
NG> the way up to PortletNamingContainerUIViewRoot). That would solve
NG> the XML requirement of all IDs being unique on a page, and guard
NG> against any portlet problems too.

Neil, does Ted's suggestion, and your endorsement of it, still apply
even after the clarification I made above?

Ed

-- 
| edward.burns_at_oracle.com | office: +1 407 458 0017
| homepage:               | http://ridingthecrest.com/