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]