I have a web application struts 2 with a page that displays a table with various elements on several lines. These elements are in textfield boxes so you can modify them and then press a submit button to send the new values.
The submit button is present on each line so I would like that when you press the button, it gets the fields of the corresponding line except that in my case, it always gets the first line.
here is a part of my jsp page
<table border="1" >
<thead>
<col align="char">
<tr bgcolor="#939393">
<td><s:text name="chu.numero_patient" ></s:text></td>
<td><s:text name="chu.numero_matelas"></s:text></td>
<td><s:text name="chu.date_scanner"></s:text></td>
<td><s:text name="chu.date_mep"></s:text></td>
<td><s:text name="chu.nb_actuel"></s:text></td>
<td><s:text name="chu.nb_total"></s:text></td>
<td><s:text name="chu.date_ftr"></s:text></td>
<td><s:text name="chu.remarques"></s:text></td>
</tr>
</thead>
<s:iterator value="list" >
<s:form id="id" method ="post" action="enregistrer_Developpeur">
<tr>
<td><s:textfield name="numero_patient" id="numero_patient" theme="simple" size="15" ></s:textfield></td>
<td><s:textfield name="numero_matelas" id="numero_matelas" theme="simple" size="6" ></s:textfield></td>
<td><s:textfield name="date_scanner" id="date_scanner" theme="simple" size="12"> </s:textfield></td>
<td><s:textfield name="date_mep" id="date_mep" theme="simple" size="8"></s:textfield></td>
<td><s:textfield name="nb_actuel" id="nb_actuel" theme="simple" size="27"></s:textfield></td>
<td><s:textfield name="nb_total" id="nb_total" theme="simple" size="25"></s:textfield></td>
<td><s:textfield name="date_ftr" id="date_ftr" theme="simple" size="7"></s:textfield></td>
<td><s:textfield name="remarques" id="remarques" theme="simple" size="10"></s:textfield></td>
<s:textfield name="id" value="%{id}" theme="simple" size="15" ></s:textfield>
<s:submit form ="id" value = "Modifier" align="center"></s:submit>
</tr>
</s:form>
</s:iterator>
</table>
How can I do that ?