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

[jsr372-experts] Re: [jsr372-experts mirror] Re: JSF_SPEC-1 Multi-field validation proposal

From: Frank Caputo <frank_at_frankcaputo.de>
Date: Fri, 25 Sep 2015 21:14:18 +0200

Hi Ed,

> Am 25.09.2015 um 17:42 schrieb Edward Burns <edward.burns_at_oracle.com>:
>
>>>>>> On Fri, 25 Sep 2015 09:40:42 +0200, Frank Caputo <frank_at_frankcaputo.de> said:
>
> FC> Perhaps we should go a special JSF way:
>
> I'm going to invoke executive authority here and insist the solution be
> done with Bean Validation. This is the platform. If people want JSF
> specific solution, it can certainly be done, and has been done.

I totally understand this.

> Frank, your point about implementation details leaking out is well
> taken. I'll see what I can do about that.

Maybe you can still do something like, what I have proposed:

<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.

Ciao Frank