This content has been marked as final.
Show 4 replies
-
1. Re: How to force validation of Seam components bound to the
gavin.king Jun 27, 2007 2:37 PM (in response to grettke_spdr)* classes do *not* need to be entities to be validated by s:validateAll
* @IfInvalid has been deprecated for a long time and was removed from Seam2
So you should figure out why s:validateAll was not working for you. -
2. Re: How to force validation of Seam components bound to the
grettke_spdr Jun 27, 2007 3:20 PM (in response to grettke_spdr)"gavin.king@jboss.com" wrote:
* classes do *not* need to be entities to be validated by s:validateAll
* @IfInvalid has been deprecated for a long time and was removed from Seam2
So you should figure out why s:validateAll was not working for you.
We are using the s:decorate, and in particular with the default edit.xhtml as the template. When we specify the control (in this case a h:selectManyCheckbox) as required, the decoration works correctly. That template uses validateAll internally. It *looks* like validateAll is working correctly.
When I remove the required and just depend on the validator annotations to run, they don't.
Any pointers on this one?
I will look into it further. -
3. Re: How to force validation of Seam components bound to the
gavin.king Jun 27, 2007 3:24 PM (in response to grettke_spdr)Well, thats a FAQ. JSF validators cannot validate null values. So @NotNull is ignored. You need to use required=true for that. Then you can use Hibernate Validator annotations for validating the entered value.
-
4. Re: How to force validation of Seam components bound to the
grettke_spdr Jun 27, 2007 3:36 PM (in response to grettke_spdr)"gavin.king@jboss.com" wrote:
Well, thats a FAQ. JSF validators cannot validate null values. So @NotNull is ignored. You need to use required=true for that. Then you can use Hibernate Validator annotations for validating the entered value.
Right, I remember reading about that bit, JSF won't validate anything unless you specify required=true.
Thanks Gavin.