StrutsCatalog: This is an efficient way to end forever that pesky and recurrent problem of how to use multiple image buttons in your forms.
Assume that you have code not unlike:
or, in Struts' image tag:
Now, how do we know which image has been clicked? The answer has been complicated and costly in the past. Here is a simple way to achieve everything at a low cost and with great flexibility and freedom.
So, don't use buttons, but just mine the value of the [name].x request parameter.
(N.B.: This solution also works for non-image (submit) buttons by using values like <input type="submit" name="add.x" value="add"> in the submit button. Or, just use <input type="submit" name="button" value="add"> for a different solution for <input type="submit"> versus <input type="image">)'''