Hi, I am trying to save values of a select in a form. The select is inside 2 nested logic iterate tags. I tried implementing it way described below but I get the following exception:
Invalid indexed property 'fileNumberBeans[indx.intValue()]' on bean class 'class com.test.OfaForm' Invalid index value 'indx.intValue()''
This is what I have in my
JSP:
<logic:iterate id="fileNumberBeans" scope="request" type="com.test.FileBean" name="ofaForm" property="fileNumberBeans" indexId="indx">
<logic:notEmpty name="fileNumberBeans">
<tr>
<td class="TableBorder">
<table id="<bean:write name="fileNumberBeans" />">
<logic:iterate id="offBn" name="fileNumberBeans" type="com.test.OfaSDOBean" property="singleDefBeans" indexId="ix">
<tr>
<td id="<bean:write name="offBn" />" align="left" width="310px" class="TableBorder">
<bean:define id="offDetailSelectList" name="offBn" property="offDetailSelectList" type="java.util.ArrayList" />
<html:select styleClass="ListBox" property="fileNumberBeans[indx.intValue()].offBn[ix.intValue()].offDetail" name="ofaForm" size="1" >
<htmlptions collection="offDetailSelectList" property="value" labelProperty="label" />
</html:select>
</td>
</tr>
</logic:iterate>
</table>
</td>
</tr>
</logic:notEmpty>
</logic:iterate>
Is there any alternative way of doing this? Any help on this will be greatly appreciated.
Ritu