Hi Peter,
I just use links to do this. (I think you can use an Image as well).
Buttons are a bit ugly so I don't need this functionality.
There's lots in struts so I don't favor adding more.
Keith.


--- Peter Severin <[EMAIL PROTECTED]> wrote:
> Hi folks,
> 
> I've been searching for a solution for multple submit buttons in the
> same form
> and how it can be achieved without using javascript. Summing up
> different suggesstions
> I came with the following solution. We can encode additional parameter
> values into the submit button name and make struts handle this
> parameters transparently for us.
> For example we could have the following html code:
> <input type="submit" name="deleteItemId_10" value="Delete">
> 
> ActionServlet would detect this parameter and auto populate the form
> with parameter 'deleteItemId' and value '10'.
> To extend this idea further we could have the following code:
> 
> <input type="submit" name="action_delete_itemId_10" value="Delete">
> <input type="submit" name="action_edit_itemId_10" value="Edit">
> 
> In the action we could test form.getAction() parameter value and to
> dispatch to the coresponding delete/edit method inside which we coule
> use form.getItemId() to execute the operation.
> You've got the point.
> I would like to hear comments and suggestions on this. I am willing to
> post the actual code in the future if the idea proves itself valuable.
> 
> Regards,
> Peter.
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
> 


=====
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Search the archive:-
http://www.mail-archive.com/struts-user%40jakarta.apache.org/
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Keith Bacon - Looking for struts work - South-East UK.
phone UK 07960 011275

__________________________________________________
Do You Yahoo!?
Try FREE Yahoo! Mail - the world's greatest free email!
http://mail.yahoo.com/

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to