I generally populate a collection of LabelValue beans and put them
in the form or some scope and use optionsCollection tag. For example
if I had a collection of LabelValue beans and named it "categoryOptions"
and my form property was "category", then the following would be the
syntax to render the select box.

<html:select property="category">
<html:optionsCollection property="categoryOptions" label="label"
value="value"/>
</html:select>

HTH,

robert

> -----Original Message-----
> From: bobd [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, March 05, 2003 2:43 AM
> To: [EMAIL PROTECTED]
> Subject: help with populating a select box from a bean
>
>
> The following code successfully iterates over an array
> coursetitles stored in bean reference courseCatalog.
>
> <logic:iterate id="element" name="courseCatalog"
> property="coursetitles" scope="session">
> <bean:write name="element"/>
> </logic:iterate>
>
> I'm now trying to populate a select box and it looks
> like <logic:iterate> is not going to work to create
> <html:option> elements.  What is the best way to do
> this?
>
> thanks,
> -bob
>
>
>
>
>
>
>
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Tax Center - forms, calculators, tips, more
> http://taxes.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]

Reply via email to