File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes html:select inside logic:iterate Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "html:select inside logic:iterate" Watch "html:select inside logic:iterate" New topic

html:select inside logic:iterate

Sri Ram
Ranch Hand

Joined: Sep 08, 2002
Posts: 48

I have a html:select inside logic:iterate. My slect box will have only two values Passed or Failed .. but for each iteration based on the value from my vector ..I need to select either one of this.. I really don't know how to set this .. Please let me know.

My drop down should have Passed as well as Failed ../but one of this should be selected ..

<logic:iterate id="infoVector" name="infoDataVectorHolder" property="infoVector" scope="request" indexId="ctr" >

<tr align=center>
<TD width=150px align=center><input type="checkbox" name="select<%= ctr %>" value="<bean:write name="infoVector" property="select" />"></TD>
<TD width=300px align=center><bean:write name="infoVector" property="modelYr" /></TD>
<TD width=250px align=center><bean:write name="infoVector" property="PCM" /></TD>
<TD width=350px align=center><bean:write name="infoVector" property="vin" /></TD>
<TD width=250px align=center><bean:write name="infoVector" property="bodyModel" /></TD>
<TD width=350px><bean:write name="infoVector" property="description" /></TD>
<TD width=150px align=center><input type="text" size="5" name="tested<%= ctr %>" value="<bean:write name="infoVector" property="tested"/>"></TD>
<TD class=tableBoldCellClear width=150px>
<select name="result<%= ctr %>" value="<bean:write name="infoVector" property="result" />">
<option value="Passed">Passed</option>
<option value="Failed">Failed</option>

I agree. Here's the link:
subject: html:select inside logic:iterate
It's not a secret anymore!