Use a Cancel button
http://struts.apache.org/1.x/struts-taglib/tlddoc/html/cancel.html
from javadoc
Renders an HTML <input> element of type submit. This tag is only valid
when nested inside a form tag body. Pressing of this submit button
causes the action servlet to bypass calling the associated form bean
validate() method. The action is called normally.
see also http://wiki.apache.org/struts/StrutsUpgradeNotes128to129
mas
Andrew Martin wrote:
Hi,
I have just begun to add validation to my forms using struts validator, which
is quite nice. I have however a problem when I have more than one submit button
on a form.
For example I have a Save button and a Back button.
The Back button is also a submit (instead of a standard button - basically
because we are creating a JS free applciation!)
Within the struts configuration the validate is set to true for this action
with an input page defined.
The validation is set to check certain fields are not empty.
As both buttons call the same action the validation is called on both, but I do
not want validation to occur on certain submit actions (namely the Back button)
Ideally I would like to configure this in the XML Struts-config.xml or
validation.xml but I am not sure if this is actually possible (I fear the worst)
If anyone has any tips, much appreciated.
Andrew
--
Mark Shifman MD. Ph.D.
Yale Center for Medical Informatics
Phone (203)737-5219
[EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]