Hello!
It happens that in my app I throw a lot of data to one logic:iterate, but they need more data, data that is dependent on each row of the iterate. So I thought to put one submit button in each row of the iterate (or maybe a link), so I can redirect the app to the next page. Problem is, the actionForm always submit the first row of data.
I have solved this problem by using javascript: setting in the first row the data of the selected row. But I was wondering if there is any other solution, such as using indexed=”true” in the submit button and then, somehow, getting the adequate data without javascripting it.
Thanks for all!
Edit to add some example code:
<logic:iterate id="MyIterator" name="sql" indexId="index">
<html:form action="MoreData" styleId="MoreData">
<tr>
<td><html:image src="docs/images/more_data.png" property="moreData" indexed="true"/></td>
<td><bean:write name="MyIterator" property="cod_user"/></td>
<td><bean:write name="MyIterator" property="txt_user"/></td>
<td><bean:write name="MyIterator" property="date_born"/></td>
<td><bean:write name="MyIterator" property="id_number"/></td>
</tr>
</html:form>
</logic:iterate>