Re: html:cancel doesn't perform as advertised
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:cancelCancel 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] -- struts 1.1 + tomcat 5.0.16 + java 1.4.2 Linux 2.4.20 Debian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: html:cancel doesn't perform as advertised
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:cancelCancel 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]
Re: html:cancel doesn't perform as advertised
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:cancelCancel 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] -- struts 1.1 + tomcat 5.0.16 + java 1.4.2 Linux 2.4.20 Debian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: html:cancel doesn't perform as advertised
Adam, OK, I get that part now... I mistakenly changed html:submit property=methodbean:message key=button.cancel//html:submit to html:cancel property=methodbean: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:cancelCancel 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]
Re: html:cancel doesn't perform as advertised
Hi Dean, I'm not sure what you're doing in your LookupDispatchAction, so I can't really say. I'm not too hot on DispatchActions. Isn't there a default? Or some other way that DispatchAction handles cancels? Adam On 03/14/2004 03:34 PM Dean A. Hoover wrote: Adam, OK, I get that part now... I mistakenly changed html:submit property=methodbean:message key=button.cancel//html:submit to html:cancel property=methodbean: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:cancelCancel 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] -- struts 1.1 + tomcat 5.0.16 + java 1.4.2 Linux 2.4.20 Debian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
html:cancel doesn't perform as advertised
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]