sunithageda
Programmer
I have to create n comboboxes dynamically each being displayed on a seperate row using iterate tag.
Onchange of the <html:select> the page is self posted and each combo should retain its own previous selected value.
I have written the following code to display the combos
<code>
<logic:iterate name="empForm" property="tabcount"
id="tabcnts" type="net.reumann.ControlForm" indexId="i">
<tr>
<td>DataSource:</td>
<td>
<html:select name="tabcnts" property="tabcnts" onchange="fun(this.options.value)">
<htmlption value="-1">--Click To Select--</htmlption>
<htmlptions collection="datasource" property="description" labelProperty="description"/>
</html:select>
</tr>
</logic:iterate>
</code>
The problem is the value selected in the first combo is assigned to the rest of the
combos and the value selected in any other combo except for the first combo is not retained.
thanks in advance
sunitha
Onchange of the <html:select> the page is self posted and each combo should retain its own previous selected value.
I have written the following code to display the combos
<code>
<logic:iterate name="empForm" property="tabcount"
id="tabcnts" type="net.reumann.ControlForm" indexId="i">
<tr>
<td>DataSource:</td>
<td>
<html:select name="tabcnts" property="tabcnts" onchange="fun(this.options.value)">
<htmlption value="-1">--Click To Select--</htmlption>
<htmlptions collection="datasource" property="description" labelProperty="description"/>
</html:select>
</tr>
</logic:iterate>
</code>
The problem is the value selected in the first combo is assigned to the rest of the
combos and the value selected in any other combo except for the first combo is not retained.
thanks in advance
sunitha