Thanks, Samuel.

Here's the code excerpt again.

1. ActionClass code excerpt:

        mBean.makeConnection();
          
        //get country list vector
                Vector v = (Vector)mBean.getCountryList();           
           
         request.setAttribute("lstCountry", v)

2. JSP code excerpt:

        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>

Any help is greatly appreciated!

Thanks,

Abhi

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


Hello Abhi,

> I am sorry, which one is the storeToBean and storeToProperty with 
> reference to my example?
I can't say, cause your example show me only the code in the JSP.

Think about where do you want to store the object selected in your 
option. I assume it is in a bean in which you'll store the content of 
your form. In my example, the bean where you store the result is the 
storeToBean.
For each field in your form, you will store the result in a property 
(attribute) of your bean class. The storeToProperty indicates in which 
field of your bean you'll store the result.

If you don't have this bean class yet, you should create it.

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