struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrade, Ernesto (Ernie)" <andr...@lucent.com>
Subject RE: html:options List
Date Fri, 13 Sep 2002 14:50:18 GMT
Try 

    <html:select property="state" size="1">
      <html:options name="allUnitedStates" labelName="allUnitedStates"/>
    </html:select>

This worked for us with an ArrayList.

Ernie



-----Original Message-----
From: Michael Lee [mailto:mleejr@hotmail.com]
Sent: Friday, September 13, 2002 10:26 AM
To: Struts Users Mailing List
Subject: html:options List


Ok, fun with html:options again!
Im trying to do this..
...
<%  pageContext.setAttribute("allUnitedStates", (List)Lookup.getData(Constant.GLOBAL.UNITED_STATES));%>
...
    <html:select property="state" size="1">
      <html:options collection="allUnitedStates"/>
    </html:select>

This is just an array list of states. I want to use the same value as text. I've tried a million
combinations and can't see any examples. All the examples want you to create an array of beans
with getters and setters. I just want to dump a collection in there (I really need to help
out with the docs when I get done with this project).
thanks,
Mike

--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message