Huh, it seems the struts way is more straight forward to me....
-----Original Message----- From: Michael Duffy [mailto:[EMAIL PROTECTED] Sent: July 17, 2003 9:45 AM To: Struts Users Mailing List Subject: Re: Ugly struts tag to JSTL transformation? Here's how I've done a drop-down in JSTL: <jsp:useBean id="lineNumbers" type="java.util.List" scope="session"/> <select name="print-line-number" size="1" title="Select a line number to print"> <c:forEach items="${lineNumbers}" var="lineNumber"> <c:choose> <c:when test="${lineNumber == printLineNumber}"> <option selected="selected"> <c:out value="${lineNumber}"/></option> </c:when> <c:otherwise> <option><c:out value="${lineNumber}"/></option> </c:otherwise> </c:choose> </c:forEach> </select> HTH - MOD --- Yansheng Lin <[EMAIL PROTECTED]> wrote: > Hi I have to populate a drop down list with the > following code. I am having > trouble converting it to JSTL. Note that I had to > use a <bean:define> for the > collection to get this working. Didn't know any > better at that time, I guess:). > > <-------code--------> > <bean:define id="codes" name="manageCostForm" > property="codes" /> > > <html:select property="item"> > <html:options collection="codes" property="code" > labelProperty="codeAndDescription"/> > </html:select> > <-------/code--------> > > Thanks! > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

