>From: "Aleksandar Matijaca" <[EMAIL PROTECTED]> 
>
> Hi there, 
> 
> I would like to be able to programatically control weather I am doing 
> validation or not. 
> For example, I have validate="true" in my struts-config file, but, I would 
> like to be 
> able to decide myself in code (in a Filter, or controller??) if the 
> validation should 
> actually be done.. How can this be done?? 
> 

One way might be to extend the form bean and override the validate method.  
There you can conditionally choose to invoke the validator logic in the super.  
Using this method, the validate="true" would always be set for that action.

There are several flavors of base validator form beans.  For example:
http://svn.apache.org/viewvc/struts/struts1/branches/STRUTS_1_2_BRANCH/src/share/org/apache/struts/validator/DynaValidatorForm.java?view=markup



> Thanks, alex. 

Reply via email to