Either set a value="xyz" or a name/property pointing to a bean with the
initial value on the <html:select> tag.

Niall

> -----Original Message-----
> From: DHarty [mailto:[EMAIL PROTECTED]]
> Sent: 12 July 2001 15:35
> To: Struts User
> Subject: html:select/options
>
>
> Is there a way to dictate which "option" in a collection is set as
> "selected" when the page is rendered?
> ex
>       <html:options collection="Roles" property="name" />
>
> For example, I have a collection of projects that are rendered by the
> <html:options> tag.  I also have  some java script which updates a project
> description box when the selection is changed.  The problem is
> when the page
> is first rendered, the two don't always match up.  I initialize the
> description box to the first item in the collection, but the
> select doesn't
> always choose the first item.
>
> Thanks
> D
>

Reply via email to