Martin Gainty <mgainty <at> hotmail.com> writes: > > using html:cancel bypasses form bean validate method > http://struts.apache.org/struts-taglib/tagreference-struts- html.html#cancelHTH----- > Original Message ----- > From: "April Francis" <afrancis <at> bcbsok.com> > To: <user <at> struts.apache.org> > Sent: Friday, October 28, 2005 12:30 PM > Subject: Struts 1.1 and Validation > > > On Struts 1.1, does the <html:cancel> tag work? > > > > Example: > > If I click on the cancel button below, will validation be ignored? > > > > <html:cancel onClick="bCancel=true;"> > > <bean:message...../> > > <html:cancel> > > > > I have put the above in my jsp, but the struts validation still runs when > > I use > > the cancel button. I'm thinking maybe struts 1.1 doesn't have the > > necessary > > pieces in place???? If so, then how can I handle a cancel? > > > > thank you, > > April > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: user-unsubscribe <at> struts.apache.org > > For additional commands, e-mail: user-help <at> struts.apache.org > > > > >
I even have this in my Action class and the validation still won't bypass... if (this.isCancelled(request)) ....don't do anything, like saving the data.... isCancelled is always false even if I click on the cancel button Is there some piece I'm missing? I want the cancel button to NOT run through validation...which is what it's suppose to do, but doesn't seem to work for me. Is there some trick? One thing I did notice, in the 'Struts In Action' book, it talks about having the 'struts-validator.tld' file (pg 136, chapter 4). BUT the Struts 1.1 download does not have it. I've also seen other sites that say it is not needed. April --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]