myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gerhard Petracek <>
Subject Re: Bean Validation?
Date Thu, 09 Jul 2009 18:56:25 GMT
hi jan-kees,

jsf-validators (if present) are invoked in any case.
that means:
 - bv is >not< available -> everything works as usual
 - bv is available -> a default validator gets added (see the new
default-validator mechanism) which delegates to bv.


Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces

2009/7/9 Jan-Kees van Andel <>

> Hey,
> I'm currently implementing the JSF 2.0 changes in
> UIInput.validateValue() for MyFaces, but the descriptions in the spec
> seem odd.
> When I'm reading the PDF, it says that when Bean Validation is
> enabled, during the RENDER RESPONSE phase, every UIInput gets a
> javax.faces.Bean Validator attached to it.
> Then, on the other hand, when I read the JavaDocs for
> UIInput.validateValue(), I see the validation process with regards to
> Bean Validation.
> The second step (described by the JavaDocs for validateValue) don't
> make much sense to me. The way I understand it, there are two issues
> with the described approach:
> 1 Duplication, since Bean Validators are only attached components when
> Bean Validation is present. The validateValue method can piggyback on
> this fact and just follow the old mechanism.
> 2 Backwards compatibility when Bean Validation is not present in the
> container. In the JavaDocs for validateValue, I don't see that
> "normal" Validators are called when Bean Validation is not present in
> the container or when it it explicitly turned off.
> Is this an error in the spec or am I reading it the wrong way? What's
> your opinion?
> Regards,
> Jan-Kees

View raw message