4 Replies Latest reply on Jun 27, 2007 3:36 PM by grettke_spdr

    How to force validation of Seam components bound to the UI t

    grettke_spdr

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