Java Mailing List Archive

http://www.gg3721.com/

Home » users.tapestry »

T5: Global entity validation not in the entity

James Sherwood

2008-10-27


Author LoginPost Reply
Hello,



I was wondering if there is a way to do global validation on entities
without using @validate in the entity.



If I have:



Public class user{



@Validate("required")

Private string username;

Private string password;



Getters/setters

}



I want to be able to replace the @Validate("required") by putting it
somewhere that it is global to the application, maybe like the .properties
file or somewhere.





The reason I would like to do this is I will be routinely over righting my
entities as I need to regenerate them from hibernate and do not want to put
the validates in that I have already put in as well I do not want to have to
put the validates in the pages each time I use the entity.



Thanks,

--James



©2008 gg3721.com - Jax Systems, LLC, U.S.A.