On Tue, 17 Aug 2004, Sebastian Ho wrote: > I have an validate method in my actionform and everything works fine. I > added a 'Back' button in my webpage, and therefore validation is not > necessary if the 'Back' button is clicked. Validation should occurs only > if 'Next' is selected. > > How do I stop struts from calling validate() is 'Back' is selected? > > Note : Both buttons are in the same form.
Just add one "if" statement into your validate() method. e.g.: if (this.backButton != null) { super.validate (mapping, request); // for validation based on XML config // add your validation here } (it supposes HTML code of your "back" button has defined a "name" attribute and of course an appropriate property must be defined in your form bean). Pavel --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]