hi thomas, rudy is talking e.g. about @ModelValidation in [1] or AbstractAnnotationModelValidationStrategy in [2].
regards, gerhard [1] https://svn.apache.org/repos/asf/myfaces/extensions/validator/trunk/examples/hello_bean-validation/src/main/java/org/apache/myfaces/blank/HelloGroupValidationController.java [2] http://goo.gl/c5REB http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces 2011/11/16 Thomas Andraschko <zoi...@googlemail.com> > > Hi, > > So i must manually validate the object with BV and creates FacesMessages, > right? > > Thanks! > > Best regards, > Thomas > > 2011/11/16 Rudy De Busscher <rdebussc...@gmail.com> > > > Hello Thomas, > > > > You need some kind of model validation, where you validate the complete > > class (when all proeprties are filled in). > > > > You can do it with a Bean Validation constraint (put it on the class level) > > or a Custom ExtVal constraint (also on class level) > > > > If you need more help, let us know. > > > > Regards > > -- > > Rudy De Busscher > > http://www.c4j.be > > > > > > On 16 November 2011 17:20, Thomas Andraschko <zoi...@googlemail.com> > > wrote: > > > > > Hi, > > > > > > i have some input fields for an entity and i want to check if the entered > > > name does already exist. > > > So i tried to create an BV constraint for the name property but i also > > need > > > the parent entity object (for checking if the entity is transient or > > not). > > > In a BV validator i can't get the the parent entity - so it's useless. > > > The other idea was to attach it on bean property level for the entity: > > > > > > @UniqueName > > > private Entity entity. > > > > > > <p:inputText value=#{myBean.entity.name <http://bean.entity.name/>}" /> > > > > > > But this wont validate the entity. > > > I thought about an custom converter and binding the #{bean.entity}. > > > The problem is, in getAsObject i must load the entity by the name and the > > > bean.entity will be overwritten. Or not? > > > > > > How can i prevent that the #{bean.entity} will be overwritten? > > > Is there another solution for validate the entity? > > > > > > I also use CODI and ExtVal. > > > > > > Thanks! > > > > > > Best regards, > > > Thomas > > > > >