[jboss-user] [JBoss Seam] - How to force validation of Seam components bound to the UI t

grettke_spdr do-not-reply at jboss.com
Wed Jun 27 14:21:57 EDT 2007


Hi folks,

Due to our architecture we are binding Seam components to the UI that happen not to be JPA entities. 

Still, we would like to define the component validations using the Hibernate Validator annotations. 

Out of the box, when we use the validateAll tag, the validations don't get performed. My take on this is that since the component bound to the UI is not a JPA entity, the validation doesn't get run.

As a work around, I added @Valid to the injection of this component into an action and @IfInvalid(outcome=Outcome.REDISPLAY) on the action method. This seems to force the validation, but now, the validation doesn't seem to get displayed nicely on the web page itself (for example if I add required=true to that component the decorator works correctly). 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4058349#4058349

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4058349



More information about the jboss-user mailing list