Hi,
keeping in mind that more than one action form may
have to validate and/or reset the same fields, i
decided to this.

I already have a MyBaseActionForm which incorporates
all
some methods that i need in my application. I don't
use Validator, as i prefer to use java classes for
validation  ligth business logic.

Now, i decided to add ALL fileds (setters and getters)
i have in my application as private members of this
MyBaseActionForm.

Then i created classes WebValidation and WebReset.
This classes have validate methods for all fields in
my application. These classes can access the fields
they need for each method because all my action forms
extend the MyBaseActionForm, thus this WebValidation
and WebReset classes can call the setters and getters
of an y action form to validate with the light
business logic i need.

I got with this approach a centralized way and
"component" responsible for the validation. All my
action forms delegate the validate and reset methods
to the classes i mentioned.

Is this some kind of pattern?? Is this good at all???

Leandro


        
        
                
_______________________________________________________
Yahoo! Acesso Grátis - navegue de graça com conexão de qualidade! 
http://br.acesso.yahoo.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to