Hi,
I tried it for my renderkit but unfortunately there is no (or I didn't
find) solution for scenario, where
value="#{bean.otherBean.constrainedProperty}" and otherBean is null. In
such case you can only obtain constrains from declared type, not from
the real one.
But for simpler cases where value EL leads to property on non-null bean
it works fine and reduces duplicity of "max length" information. JPA
2.0 uses @Size for DB constraints too.
Regards,
Martin Kočí
Mark Struberg píše v Út 24. 08. 2010 v 20:41 +0000:
> Hi!
>
> Not sure if this is covered in the spec, but wouldn't if be useful to parse
> for
> the JSR-303 Size annotation [1] and use this value for the maxlength
> attribute
> of h:inputText fields if nothing is manually specified in the xhtml?
>
> LieGrue,
> strub
>
>
> [1]http://download.oracle.com/javaee/6/api/javax/validation/constraints/Size.html
>
>
>
>