-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Thom,
Thom Burnett wrote: > I have a few buttons on my jsp page and I want to have validation happen on > some buttons and not on other buttons. > > Is that possible? How? Any examples around? This question came up a few weeks ago, and I'll tell you what I told whoever asked in the past. There may be other solutions, but this one is fairly straightforward. First, you create an action that is intended to handle the form submission itself. No need for a form bean or anything like that (and, of course, there's no validation). Just write it like this: public ActionMapping execute(...) { if(null != request.getParameter("first_button")) return mapping.findForward("first-forward"); else if(null != request.getParameter("second_button")) return mapping.findForward("second-forward"); else if(null != request.getParameter("third_button")) return mapping.findForward("third-forward"); . . . } Then, your first-, second-, and third-forwards can be defined to forward (not redirect) the request to the "real" actions that do whatever you want them to do. /Those/ actions should have form bean associated with them and validation="true" in the mappings. Remember that your "real" actions should all have the same "input" set so that any validation errors will go back to the same page. Hope that helps, - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFfuiL9CaO5/Lv0PARAir4AKDCPozKfHQnaYXOzB+82nlmPmJuGQCeKQpH C8fLHrm2tqDo2N/EKF+sbBA= =6HwP -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]