I am using the nested tags with Struts 1.02. I want to be able to dynamically set a call to a javascript function. I want to pass in the row number to the function.
I currently have.... <nested:iterate property="asrTranList" type="abbott.ai.tcgm.entities.AsrTran" indexId="idx"> <tr> <td class="maintCenter"> <nested:text property="actionCode" maxlength="1" size="1" styleClass="maintWidth1" onchange="makeEditDirty('hideOnEdit','showOnEdit','<bean:write name="idx" scope="page" />');" onkeyup="return autoTab(this, 1, event);" /> </td> </tr> </nested:iterate> This does not work. I have also tried <nested:iterate property="asrTranList" type="abbott.ai.tcgm.entities.AsrTran" indexId="idx"> <tr> <td class="maintCenter"> <nested:text property="actionCode" maxlength="1" size="1" styleClass="maintWidth1" onchange="makeEditDirty('hideOnEdit','showOnEdit','<%="idx"%>');" onkeyup="return autoTab(this, 1, event);" /> </td> </tr> </nested:iterate> It does not work either. It is looking to me like a bug with the nested tags. They sure have been very useful. I would hate to change all the code back at this point. Why can I use a regular jsp <%=idx%> to get the value of the indexId from the iterate tag? Thanks.