Hello I am trying to construct a model that has multiple radio buttons per object but keep them distinct, therefore they need a different name. I almost have it by creating a array of objects and using nested iterate, with the code below. However, of course it does not increment the index on the second and successive iterations. Is this possible? I have tried all permutations of attributes and all I want is it to automatically increment, radioOptions[n] for each record. Any help appreciated.
this struts <nested:iterate property="radioOptions" name="current"> <nested:define id="first" property="firstOptionVal" type="java.lang.String"/> <nested:radio value='<%=first%>' property="value"/> <nested:define id="second" property="secondOptionVal" type="java.lang.String"/> <nested:radio value='<%=second%>' property="value"/> </nested:iterate> generates this for all records <input type="radio" name="radioOptions[0].value" value="radio"> <input type="radio" name="radioOptions[0].value" value="checkbox">