OK, I get that part now... I mistakenly changed
<html:submit property="method"><bean:message key="button.cancel"/></html:submit>
to
<html:cancel property="method"><bean:message key="button.cancel"/></html:cancel>
which turns into
<input type="submit" name="method" value="Cancel" onclick="bCancel=true;">
instead of what you showed me:
<input type="submit" name="org.apache.struts.taglib.html.CANCEL" value="Cancel" onclick="bCancel=true;" />
That breaks another part now... I created a subclass of LookupDispatchAction to handle the various
button presses. If the user clicks on the Cancel button I just want to take my "cancel" forward.
What do I need to do to my Action to accomplish that?
Dean Hoover
Adam Hardy wrote:
Server-side validation is skipped by struts when it sees the "org.apache.struts.taglib.html.CANCEL" request param.
On 03/14/2004 12:20 PM Dean A. Hoover wrote:
What about the non-Javascript validation?... that's what I want to avoid.
The whole Javascript validation thing is optional anyway and doesn't
seem like the best way to implement it (because its optional).
Dean
Adam Hardy wrote:
The javascript will be output by the html:form tag and it stops javascript validation.
The cancel button should look like this:
<input type="submit" name="org.apache.struts.taglib.html.CANCEL" value="Cancel" onclick="bCancel=true;" />
The JSP should look like this:
<html:cancel>Cancel or whatever</html:cancel>
Adam
On 03/14/2004 12:56 AM Dean A. Hoover wrote:
I have an html:form with a html:submit and an html:cancel. According to the documentation for html:cancel:
"Pressing of this submit button causes the action servlet to bypass calling the associated form bean validate() method."
I tried it and it did validation anyway. Then I looked at the generated HTML and I see:
<input type="submit" name="method" value="Next">
<input type="submit" name="method" value="Cancel" onclick="bCancel=true;">
The only difference I see is the onclick attribute. How is that supposed to do anything, given that that there isn't any javascript in the file. What am I missing here?
Dean Hoover
--------------------------------------------------------------------- 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]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]