Ah yes, perhaps I should read up on the docs ;) I was (incorrectly) remembering from a custom tag on a recent project.
Sorry for the confusion! -- James Mitchell Software Engineer / Open Source Evangelist EdgeTech, Inc. http://www.EdgeTechServices.net/ 678.910.8017 AIM: jmitchtx ----- Original Message ----- From: "Takhar, Sandeep" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <[EMAIL PROTECTED]> Sent: Monday, May 10, 2004 9:14 AM Subject: RE: Why cancel throw Action.execute ? Are you sure data is not populated? I think it is, but validate is not called because html:cancel sends a specific parameter in the request. sandeep -----Original Message----- From: James Mitchell [mailto:[EMAIL PROTECTED] Sent: Monday, May 10, 2004 8:02 AM To: Struts Users Mailing List Subject: Re: Why cancel throw Action.execute ? You should read up on the docs. This is by design. If cancel is clicked, the page will still be submitted, but your form bean will NOT be populated. You can then check for isCancelled() in your action. This gives you 2 immediate advantages (and probably more, but these jump out at me) a) you can maintain your form data (if it was session scoped) b) you can still force all requests to go through the controller (MVC BABY!!) -- James Mitchell Software Engineer / Open Source Evangelist EdgeTech, Inc. http://www.EdgeTechServices.net/ 678.910.8017 AIM: jmitchtx ----- Original Message ----- From: "Olivier Citeau" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, May 10, 2004 7:46 AM Subject: Why cancel throw Action.execute ? > Hi, i have a Struts form with a submit and a cancel button. > Something strange occurred. > It is that when user click on html:cancel button, "execute" > method of Action is executed. > > I could solve it by coding : > ActionForward forward=null; > if (this.isCancelled(request)) > return forward; > > It works. But i did not need to make this test in the past. > Is it possible that when user click cancel, nothing happens > on the server ? > > ===== > > Olivier Citeau > > Paris, France > > > > > > > > Yahoo! Mail : votre e-mail personnel et gratuit qui vous suit partout ! > Créez votre Yahoo! Mail sur http://fr.benefits.yahoo.com/ > > Dialoguez en direct avec vos amis grâce à Yahoo! Messenger !Téléchargez Yahoo! Messenger sur http://fr.messenger.yahoo.com > > --------------------------------------------------------------------- > 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]