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

[jsr372-experts] Re: [jsr372-experts mirror] Re: Re: Please Review: JSF 2.3 EDR draft

From: Frank Caputo <frank_at_frankcaputo.de>
Date: Fri, 9 Oct 2015 15:13:56 +0200

Hi,

> Am 09.10.2015 um 03:43 schrieb Leonardo Uribe <leonardo.uribe_at_irian.at>:
>
> - Multi-field Validation <f:validateWholeBean />
>
> I feel unconfortable about this:
>
> "... This tag must be placed in the component tree after all of the fields that are to be included in the multi-field validation. If this precondition is not met, the results of applying this tag are unspecified. ..."
>
> It is clear the reason of the statement: before the validation it is necessary to be sure that all fields have their values assigned.
>
> But it would be better if the validation is done as part of the parent UIForm instance. If there is an input component, there is always an UIForm instance in the component hierarchy. It sounds better to "subscribe" a component instance to the parent UIForm (an special facet for UIForm? or an special "validator" attached object?).
>
> It is also not clear what happens when an ajax request is performed. Please note <f:validateWholeBean /> does not have an id, but there is a underlying UIInput instance mentioned in the javadoc. The problem is if by coincidence the UIInput instance is inside a part that does some partial validation, the validation code will be activated, even if the request performs a partial validation over the form.

I still feel the same.

> Am 25.09.2015 um 21:14 schrieb Frank Caputo <frank_at_frankcaputo.de>:
>
> <f:validateWholeBean value="#{backingBean}">
> <input jsf:id="password1" jsf:value="#{backingBean.password1}"/>
> <input jsf:id="password2" jsf:value="#{backingBean.password2}"/>
> </f:validateWholeBean>
>
> UIValidateWholeBean could override processValidators and collect all necessary information from it’s children and hide as much much as possible in the implementation. Maybe you don’t need any changes to javax.faces.validator.BeanValidator.

The proposed solution has also too many changes to the public API for me.

Ciao Frank