Most of us would not rely *solely* on Javascript for validation, since it can be turned off, and therefor endanger your application. But requiring it to handle multiple buttons is a different matter, so long as the default formAction did nothing harmful if Javascript were turned off.
The ValidatorForm in the contrib folder generates *lots* of Javascript. The html:form tag also generates a Javascript to move the focus, as do some others. So, I don't see anything wrong with a tag that generated Javascript for setting a property. Heck, I'm doing by hand myself ;-) -- Ted Husted, Husted dot Com, Fairport NY USA. -- Custom Software ~ Technical Services. -- Tel +1 716 737-3463 -- http://www.husted.com/struts/ Joe Faith wrote: > > We have also implemented a multiple submit button system; but in our > case we wrote a custom tag that generates javascript that sets a property > to a specified value and submits the form when you hit the button. > > The tags look something like: > > <my_submit property="formAction" value="delete" label="Delete this > record"/> > <my_submit property="formAction" value="save" label="Save changes"/> > <my_submit property="formAction" value="copy" label="Copy this record"/> > > etc > > A single action object can then use the value of formAction to decide what to > do in each case. > This has the side-effect of reducing the number of Action classes needed. > > However, the tags generate javascript and I wasn't sure if this fitted the > struts philosophy; so I > haven't submitted the code changes. But if anyone was interested I could make > it available. > > Joe Faith > > Runtime Collective, Ltd > T: (+44) 01273 234294 -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>