struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Cheshire" <cheshira...@gmail.com>
Subject Re: collection for html:optionsCollection in servlet context
Date Wed, 01 Mar 2006 23:50:42 GMT
On 3/1/06, Craig McClanahan <craigmcc@apache.org> wrote:
>
> If the thing stored under attribute "states" in application scope is, in
> fact, a List of beans, you won't need the "property" attribute at all.
> Specifying a "name" but not a "property" tells the tag to use the attribute
> value itself.
>

Ahhh this is what I was missing! The reference I looked at said that
property was actually required (Jakarta Struts Pocket Reference -
Cavaness & Keaton).


>  You might then use it in a page like this:
>
>     <html:select ...>
>         <html:optionsCollection name="states" value="abbreviation"
> label="name"/>
>     </html:select>
>

Thanks Craig, this works :)

Chris

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


Mime
View raw message