Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Struts - Logic Iterate - help

Status
Not open for further replies.

sunithageda

Programmer
Oct 28, 2003
1
0
0
IN
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=&quot;empForm&quot; property=&quot;tabcount&quot;
id=&quot;tabcnts&quot; type=&quot;net.reumann.ControlForm&quot; indexId=&quot;i&quot;>
<tr>
<td>DataSource:</td>
<td>

<html:select name=&quot;tabcnts&quot; property=&quot;tabcnts&quot; onchange=&quot;fun(this.options.value)&quot;>
<html:eek:ption value=&quot;-1&quot;>--Click To Select--</html:eek:ption>
<html:eek:ptions collection=&quot;datasource&quot; property=&quot;description&quot; labelProperty=&quot;description&quot;/>
</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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top