On Mon, Mar 18, 2013 at 3:42 PM, Andy Schwartz <andy.schwartz_at_oracle.com>wrote:
> 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...
Agreed. Some existing solutions handle #2; such as the OmniFaces solution
does it for all of the components on the page, which is more absolute, but
probably used for the same use case:
http://showcase.omnifaces.org/eventlisteners/ResetInputAjaxActionListener.
>
>
> Andy
>
>
>