You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Mississippi John Hurt <jo...@gmail.com> on 2006/08/10 02:27:53 UTC
Multiple Image Submit Buttons in Form?
Hi,
What's the best way to handle a page that has 3 clickable image buttons:
A list of Items indexed, each row has an image button, if clicked, routes to
a EditItem action.
An Add Item image button, that routes to a AddItem action.
An input text box, with a Search image button, that routes to a SearchItems
action when clicked.
Assuming I use a single form, how will my action know which button was
clicked (Edit vs Add vs Search). And how to pass the index of the Item#
button that was clicked? Anyone have samples (jsp,actionClass) of this
particular situation? Thanks.
Re: Multiple Image Submit Buttons in Form?
Posted by Paul Benedict <pa...@yahoo.com>.
Use EventAction or EventActionDispatcher from Struts 1.2.9. If you are using a previous version of Struts, just pluck out these classes into your source folders.
Mississippi John Hurt <jo...@gmail.com> wrote: Hi,
What's the best way to handle a page that has 3 clickable image buttons:
A list of Items indexed, each row has an image button, if clicked, routes to
a EditItem action.
An Add Item image button, that routes to a AddItem action.
An input text box, with a Search image button, that routes to a SearchItems
action when clicked.
Assuming I use a single form, how will my action know which button was
clicked (Edit vs Add vs Search). And how to pass the index of the Item#
button that was clicked? Anyone have samples (jsp,actionClass) of this
particular situation? Thanks.
---------------------------------
Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1ยข/min.