Thanks for the Reply Amar !

See, I have a property called 'availableFunds' in my ActionForm(named
myForm) and a getAvailableFunds() which returns an ArrayList. Now if I
want to populate my ListBox using the same logic, this is what  should
be doing.
Please validate if I'm thinking on the correct lines :

<html:select property="availableFunds" multiple="true">
<html:options collection="<%myForm.getAvailableFunds()%>" property=?
labelProperty="List of Funds">
</html:select>

Please let me know if my approach is correct. Also am confused as to
what would be the property in <html:options>

TIA,
Priya


-----Original Message-----
From: Jirole, Amar [mailto:[EMAIL PROTECTED] 
Sent: Thursday, September 16, 2004 7:03 PM
To: 'Struts Users Mailing List'
Subject: RE: html:options Help

Here is sample usage for Country drop down.
<html:select property="countryId" size="1" styleClass="inputField">
        <html:options
                collection="countryOptions"
                property="id"
                labelProperty="name"/>
</html:select>


Where countryId is property on you form, countryOptions is bean name
which
holds collection of objects of class country with properties id and
name.

HTH
-Amar

-----Original Message-----
From: Priya Jotwani [mailto:[EMAIL PROTECTED] 
Sent: Thursday, September 16, 2004 7:14 AM
To: Struts Users Mailing List
Subject: RE: html:options Help


I have seen the Struts Documentation for the same but couldn't really
gather
much !! Can someone give me an example of using <html:option collection
>

TIA,
Priya

-----Original Message-----
From: Priya Jotwani 
Sent: Wednesday, September 15, 2004 8:27 PM
To: [EMAIL PROTECTED]
Subject: html:options Help

Can somebody give me an example of how to use <html:options>  for
populating
my Listbox with the values returned by getFundlist() of my ActionForm ?

 

TIA,

Priya


---------------------------------------------------------------------
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to