Samuel:

I am sorry, which one is the storeToBean and storeToProperty with 
reference to my example?

The vector lstCountry contains CountryObject beans that have getters and
setters
for country_id and name.
        
        <bean:define id="c" name="c" type="com.whatever.CountryObject"/>
                <html:select name="c" property="country"  multiple="true">
                <html:options collection="lstCountry" property="country_id"
labelProperty="name"/>
                </html:select>

Thanks,

Abhi


-----Original Message-----
From: Samuel Rochas [mailto:[EMAIL PROTECTED]
Sent: Friday, April 30, 2004 11:12 AM
To: Struts Users Mailing List
Subject: Re: Drop down population question


Hello Abhi,

>          request.setAttribute("lstCountry", v)
So the bean with you list is "lstCountry".

JSP:
<html:select name="storeToBean" property="storeToProperty">
        <html:options collection="lstCountry" property="id"
        labelProperty="name"/>
</html:select>

Explanation:
-storeTo is the bean where to store the result
-storeToProperty is the property of the bean storeTo where to store the 
result
-lstCountry: your bean with the collection of beans
-id: the property of the bean contained in you collection that you use 
for the "value" part of the option (the value returned to 
storeToProperty when you select an option)
-name: the property of the bean contained in you collection that you use 
for the content shown to the users of you site

Sincerly
Samuel

---  andinasoft SA - Software y Consulting  ---
Mariano Aguilera 276 y Almagro - Quito, Ecuador
Tel. +593 2 290 55 18 ---- Cel. +593 9 946 4046
---------  http://www.andinasoft.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