struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Samuel Rochas <samuel.roc...@andinasoft.com>
Subject Re: Drop down population question
Date Fri, 30 Apr 2004 15:12:06 GMT
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: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message