webtier@glassfish.java.net

Re: [webtier] JSF2 Nightly Build - f:validateBean

From: Ryan Lubke <Ryan.Lubke_at_Sun.COM>
Date: Wed, 01 Apr 2009 09:48:59 -0700

On 3/31/09 9:58 AM, webtier_at_javadesktop.org wrote:
> Hello again (and sorry if i'm posting in the wrong place, but i think this is the best forum to talk about JSF2, i dont know if we can speak about the Nightly Builds either so tell me if im doing something wrong).
>
> I'm testing JSF2 with the Bean Validation (hibernate-validator-4.0.0.Alpha3-dist), but i cant make the validation error get displayed in the h:message component:
>
> <h:form id="formulario">
> Nome:
> <h:inputText id="nome" value="#{crudTeste.pessoa.nome}">
> <f:validateBean/>
> </h:inputText>
> <h:message for="nome"/>
> <br/>
> <h:commandButton id="botao" value="Salvar" action="#{crudTeste.salvar}">
> <f:ajax execute="@this @form" render="@all"/>
> </h:commandButton>
> </h:form>
>
> The validation is working, but it's not displaying the message after the submit (in fact it's working the same way even without the f:validateBean)
>
> Here it is the console output:
>
> java.lang.AbstractMethodError: javax.faces.validator.BeanValidator$JsfAwareMessageInterpolator.interpolate(Ljava/lang/String;Ljavax/validation/MessageInterpolator$Context;)Ljava/lang/String;
> at org.hibernate.validation.engine.ExecutionContext.createConstraintViolation(ExecutionContext.java:279)
> at org.hibernate.validation.engine.ExecutionContext.createConstraintViolations(ExecutionContext.java:269)
> at org.hibernate.validation.engine.ConstraintTree.validateConstraints(ConstraintTree.java:120)
> at org.hibernate.validation.engine.MetaConstraint.validateConstraint(MetaConstraint.java:136)
> at org.hibernate.validation.engine.ValidatorImpl.validateValueForGroup(ValidatorImpl.java:494)
> at org.hibernate.validation.engine.ValidatorImpl.validateValue(ValidatorImpl.java:443)
> at org.hibernate.validation.engine.ValidatorImpl.validateValue(ValidatorImpl.java:147)
> at javax.faces.validator.BeanValidator.validate(BeanValidator.java:304)
>
The beans validation API has changed since 4.0.0-alpha3. You'll
probably need to build the latest beans validation api/ri from source
[1] (quick search didn't yield any nightly snapshots).
> And.. where can i get more information about the @this @form keywords?
>
@all - All component identifiers
@none - No identifiers
@this - The element that triggered the request
@form - The enosing form

These should all be fully documented in the upcoming proposed final
draft of the spec.

[1] http://www.hibernate.org/459.html
> Thks in advance,
>
> Israel
> [Message sent by forum member 'israelbgf' (israelbgf)]
>
> http://forums.java.net/jive/thread.jspa?messageID=339893
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: webtier-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: webtier-help_at_glassfish.dev.java.net
>
>