This content has been marked as final.
Show 7 replies
-
1. Re: SFSB and Hibernate Validator -
pmuir Sep 13, 2007 5:56 AM (in response to gersonk)Use
<h:inputText id="id" value="#{someService.searchIdString}" /> and get rid of the @In
-
2. Re: SFSB and Hibernate Validator -
gersonk Sep 13, 2007 2:32 PM (in response to gersonk)It worked!
Could you explain how it works? -
3. Re: SFSB and Hibernate Validator -
matt.drees Sep 13, 2007 3:18 PM (in response to gersonk)I'd recommend reading the source code. It's pretty cool, I think. Check out ui/src/main/java/org/jboss/seam/ui/validator/ModelValidator and src/main/org/jboss/seam/core/Validators
-
4. Re: SFSB and Hibernate Validator -
gersonk Sep 13, 2007 4:14 PM (in response to gersonk)Actually I'd like to know why the code worked fine when I got rid of the '@In'.
-
5. Re: SFSB and Hibernate Validator -
pmuir Sep 13, 2007 5:09 PM (in response to gersonk)Seam needs to be able to look up a model.value to find the relevant validation annotation, @In doesn't do that.
-
6. Re: SFSB and Hibernate Validator -
gersonk Sep 13, 2007 8:36 PM (in response to gersonk)"pete.muir@jboss.org" wrote:
Seam needs to be able to look up a model.value to find the relevant validation annotation, @In doesn't do that.
Sorry, I didn't understand yet.
If I submit the form (call some method on SFSB), Seam could validate immediately after injecting the model.... -
7. Re: SFSB and Hibernate Validator -
pmuir Sep 14, 2007 5:20 AM (in response to gersonk)No, because the validation runs in the PROCESS VALIDATIONS JSF phase which runs before updating model values and invoking the action (needs to so you don't get invalid data on your model). If you want to understand Seam you need to understand the JSF lifecycle as well.