Re: Validator with annotations

2013-06-28 Thread Simone Camillo Buzzi
Hi, the goal that I'm trying to reach is to reduce the number of variables and method into the Struts action to improve code readability and maintainability. I'm using hibernate, so I could obtain a good synergy if i can set value coming from parameters directly into the hibernate model bean, maint

Re: Validator with annotations

2013-06-28 Thread Maurizio Cucchiara
Ciao Simone, have a look at VisitorFieldValidator [1] [2] and model driven. IMO it's better to keep the annotations inside the action rather than the bean (you can have different use cases for the same model). [1] http://struts.apache.org/release/2.3.x/docs/visitorfieldvalidator-annotation.html

Validator with annotations

2013-06-27 Thread Simone Camillo Buzzi
Hi, I have some doubt about how to use validation annotation. I'm changing my code to make it more readable and maintainable. I started from an action where I had all setters with annotation and i put data in a private local variable ex. private String email; @RequiredStringValidator(key="fieldE