Gündüz Can Topal wrote the following on 1/19/2006 11:11 AM:


I got the values in a vector consists of hashmap holding id name pairs, and put the vector in session in a setup action.

But couldn't manage to generate dropdown list using html tag. How can it be done?

You can probably use the html:options tag but I like JSTL with html:select and html:option (I'm assuming you wanted Struts select tag?)

<html:select property="yourFormBeanPropery">
<c:forEach var="item" values="${mapName}">
        <html:option value="${item.key}">
                <c:out value="${item.value}"/>
        </html:option>
</c:forEach>
</html:select>

The above assumes your key in your Map is the value you want to use and the value in your Map is what you want to display for the option.

--
Rick

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to