Oops, that was a typo. Should have read
<td><html:image src="delete.gif" name="<%= "delete_" + choiceKey %>" /></td>
If browsers did pick up "value" parameter, this problem would not even exist...
Some browsers do. What is your problem? Why are you adding "delete" in here?
There is no "name" attribute with image. I assume you mean to use the "property" attribute. There is no problem with this, even without a "value" attribute. If you use "property='<%= "delete" + choiceKey %>'", and (in your processing of the form):
String button = null; Enumeration enum = request.getParameterNames(); String parameterName = null; while(enum.hasMoreElements()) { parameterName = (String)enum.nextElement(); if(parameterName.endsWith(".x")) { button = parameterName.substring(0,parameterName.indexOf('.')); } }
Sorry, I seem to have gotten a bit confused here. You are correct with your assumption that I meant the "property" attribute.
I described what I wanted to achieve in my original posting. To recap, I want to have a page with several delete buttons. Clicking on one button would produce parameter
delete_23.x=56
to be sent => we parse that, and delete item with ID 23 from database. Choosing a different delete -button would send parameter
delete_304.x=144
=> we delete item with ID 304.
I am aware that I can use the approach you suggested (parse request parameters manually), and have been doing that for ages before I started learning Struts :) I was just expecting that Struts would somehow help me with this task. I have been looking into indexed properties but I have not quite figured out how to properly implement this kind of functionality using them.
_________________________________________________________________
Help STOP SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]