Skip to main content

JSF2 Nightly Build - f:validateBean

3 replies [Last post]
israelbgf
Offline
Joined: 2009-03-31

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:

Nome:

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

And.. where can i get more information about the @this @form keywords?

Thks in advance,

Israel

Text layout problems.

Message was edited by: israelbgf

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
cayhorstmann
Offline
Joined: 2003-06-13

FWIW, I just got this to work with hibernate-validator-4.0.0.Beta1. I had to add the following files to the WEB-INF/lib directory:

hibernate-validator-4.0.0.Beta1.jar, lib/slf4j-log4j12-1.5.6.jar, lib/log4j-1.2.14.jar, lib/slf4j-api-1.5.6.jar, lib/validation-api-1.0.CR2.jar

Ryan Lubke

On 3/31/09 9:58 AM, webtier@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:
>
>
> Nome:
>
>
>

>
>

>
>
>

>

>
> 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@glassfish.dev.java.net
> For additional commands, e-mail: webtier-help@glassfish.dev.java.net
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: webtier-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: webtier-help@glassfish.dev.java.net

israelbgf
Offline
Joined: 2009-03-31

Thks for the feedback.

Israel