users@javaserverfaces-spec-public.java.net

[jsr344-experts mirror] [jsr344-experts] Re: UIViewRoot API review

From: Andy Schwartz <andy.schwartz_at_oracle.com>
Date: Mon, 18 Mar 2013 15:42:17 -0400

Hi Kito -

On 3/18/13 10:16 AM, Kito Mann wrote:
> Ideally, we would want to support both use cases. There are some cases
> where you really only want this behavior for specific fields (this is
> the case I often see). This happens when you're manipulating only a
> couple of fields via Ajax, and you want to clear the values, but the
> other fields on the form (maybe in a separate tab) are okay.
>
> However, I'm sure there are cases where you really just want to reset
> the entire form, in which case listing all of the ids may be
> impossible (again, a page with one form and multiple tabs is a good
> example).

Right. My take is that we want to support both:

1. Targeting individual EditableValueHolders.
2. Targeting all EditableValueHolders within some ancestor container
(eg. the form, or even just some arbitrary layout component).

Mojarra's implementation of UIViewRoot.resetValues() handles #1, but not
#2. And since Mojarra's f:ajax resetValues feature relies on
UIViewRoot.resetValues(), this has the same limitation.

I am thinking that we should lift this limitation, since #2 seems like
it will be a very common case.

In any case, let's see what Cagatay has to say...

Andy