You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Vaylee Mckenzie-Daniels (VA)" <Mc...@telkom.co.za> on 2006/09/06 15:02:06 UTC

RE: Action based client validation



> I am struggling to find resources on how to enable the validation
> only when submit is selected. Validation should not be done when
> cancel is selected.
>
> Please help.
>
> Thx
> Vaylee


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This e-mail and its contents are subject to the Telkom SA Limited
e-mail legal notice available at
http://www.telkom.co.za/TelkomEMailLegalNotice.PDF
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Re: Action based client validation

Posted by Michael Jouravlev <jm...@gmail.com>.
On 9/6/06, Vaylee Mckenzie-Daniels (VA) <Mc...@telkom.co.za> wrote:
>
>
>
> > I am struggling to find resources on how to enable the validation
> > only when submit is selected. Validation should not be done when
> > cancel is selected.

If you use JSP for the view part of your app, then use <html:cancel>
to render Cancel button. The key that it submits is processed by
Struts as cancel action and no validation is performed (launch HTTP
sniffer to see value submitted by cancel button).

Or you can turn autovalidation off and validate input data whenever you need.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org