Glenn,

- Use a descendant of DispatchAction for your form's action,
- Have two separate methods in the action class for your two buttons
(one for 'commit' and one for 'cancel').
- In the struts-config.xml file, specify attribute 'validate' to 'false'
for your form's action.The form validation wont't happen automatically
this way.
- In the method for the 'commit' button, call explicitely 'validate' on
your form. But not in the method associated to the cancel button.

Hope this helps.


Le mar 07/10/2003 à 13:49, Glenn Holmer a écrit :
> When you're using DynaValidatorForm and the page has two buttons
> (e.g. "Commit" and "Cancel"), how do you not validate if the user
> hits the "Cancel" button (which on my page, also submits, but the
> action checks the value of the submit button)?
> 
> Do I have to write a Form subclass to do this?  Can you have a
> hand-coded Form subclass and use the Validator rules as well?
> 
> -- 
> ____________________________________________________________
> Glenn Holmer                          [EMAIL PROTECTED]
> Programmer/Analyst                       phone: 414.908.1809
> Weyco Group, Inc.                          fax: 414.908.1601
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 



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

Reply via email to