Hi,
I don't really know how to title my question, but I have a JSP page with a table displaying elements from a database, and I want to have a button for each row to either delete or edit that particular row. Here is the part of my JSP page where I generate the table (the table and buttons are generated fine)
<style type="text/css">
table { empty-cells: show; }
</style>
<table border="1">
<tr>
<th>Action</th>
<s:iterator value="columnNames" id="name">
<th> <s:property value="name" /> </th>
</s:iterator>
</tr>
<s:iterator value="%{table}" id="row">
<tr>
<td>
<table><tr><td>
<s:form action="edit" namespace="/." theme="simple">
<s:submit value="Edit" name="edit" />
</s:form></td>
<td>
<s:form action="remove" namespace="/." theme="simple">
<s:submit value="Remove" name="remove" />
</s:form></td></tr>
</table></td>
<s:iterator value="%{#row}" id="cell">
<td><s:property value="%{#cell}"/></td>
</s:iterator>
</tr>
</s:iterator>
</table>
How would I get it so that when I click on a particular button on a certain row, that my program will know which row it should perform the action on (edit/delete)? Sorry, I'm still pretty new to Struts2 still...