"bfo81" wrote : 
  | But when you create a new person all its properties are null. And when you 
fill in the fields in a form and click save, then the persons properties are 
still null during validation (phase 3). They get their concrete values later, 
in phase 4 (update model values). And, alas, you cannot compare something to 
null.
  | 

Take a look at the ModelValidator class in org.jboss.seam.ui. That does its 
validation at the process Validation phase by using the model class (and the 
validators that go along with it) and the values that are in the request. 

One other way is that since the values are updated in the model only 
later(after the processValidations), you could queue a new type of event and 
set the phaseid of that to be UPDATE_MODEL_VALUES. That way the event will be 
queued during validations but will only be processed after the model values are 
updated. Thats still ugly(as you are validating in a phase thats not meant for 
that ) but will work.


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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3968824
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to