This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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>

It is sorta covered in the JavaRanch Style Guide.
subject: html:select inside logic:iterate
Similar Threads
drop down list: on refresh page by default select option is not coming
In jsp page After decimal i need only 2 values(for ex:477.74)
Help me about html:select
getting value in logic iterate
JSP Radio button value retrieval