Have your Action class be of type DispatchAction. Instead of execute methods in your action have methods for each button, for example save(), delete() and cancel().
Then in your JSP where the buttons are do something like:
�
�������� <html:submit property="method" title="Save thing.">
����������� <bean:message key="button.save"/>
�������� </html:submit>
So you're saying that your form bean has a property called method? Why have it there too? It's never used from there, right?
And in your ApplicationResources.properties you must define button.save:
button.save=Save
�
So when you do all of this and press the Save button you get a HTTP request param "method=Save" come through.
�
Then in Struts the DispatchAction sends it to your action and calls the save method.
Again I cringe at this. Now the word "Save" is hardcoded into your Java code and if the label changes so much your method name if you're using DispatchAction. Again, LookupDispatchAction was designed for this very scenario - multiple submit buttons submitting the same form.
I recommend against using DispatchAction for this purpose, but it'll certainly work (but beware the risks).
Or, you could switch to Tapestry and have an event listener for every button tied directly to a method! :)
Erik
_______________________________________________ Juglist mailing list [EMAIL PROTECTED] http://trijug.org/mailman/listinfo/juglist_trijug.org
