-
1. Re: Problem with @NotNull
graben May 21, 2008 10:55 PM (in response to pancor)It's not a problem of @NotNull. This behavior belongs to JSF. If the inputText component is empty the validation is not executed. that is why the notnull validator seems to do not work. required=true is absolutely necessary to use. Another solution is to manually check the field in the managed bean.
-
2. Re: Problem with @NotNull
haefti May 22, 2008 3:26 PM (in response to pancor)I'm facing the same problem but I did not know whether this is a SEAM or a general JSF problem.
The behaviour is pretty awful because none of the Hibernate validators seem to work on empty strings. For example you can use @Length(min = 2) which does nothing on an empty string but fires the right message if you enter only one character.
-
3. Re: Problem with @NotNull
www.supernovasoftware.com May 22, 2008 5:54 PM (in response to pancor)I am curious why JSF was ever designed to work this way.
Anyone know?
-
4. Re: Problem with @NotNull
chris.simons May 22, 2008 7:57 PM (in response to pancor)A very good question.
This problem also affects the @Email (albeit, this is a part of Seam) annotation. Though I think the Seam devs are working on a fix for this particular problem.
Jason - are you the same Jason who put together the awesome Seam on OC4J 10.1.3 blog?