Quite often I need to implement a form that has several submit buttons - for example a page where several products are listed, and next to each product is a "delete" -button. Since clicking on each button sends only one parameter, I have to encode both the action and the id of the item into same parameter....for example

<input type="image" src="pics/delete.gif" name="deleteitem_146" value="somevalue">

When the image button is clicked, browser sends parameters that look like

deleteitem_146.x = 13
deleteitem_146.y = 21

This kind of parameter has to be "decrypted", by first running through all request parameters to find ones starting with "deleteitem_" and then extracting the correct id (in this case 146). Usually I do this with various custom made helper classes...

Does struts provide some sort of help to this problem? I have to say I am quite surprised if it does not!

_________________________________________________________________
MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus



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



Reply via email to