This is how we do it:
<html:select name="yourActionForm" property="fieldToHoldSelectedValue"> <html:options collection="yourArrayList" property="optionValue" labelProperty="optionLabel"/> </html:select> The ArrayList (in yourActionForm bean) should contain a list of Objects (call it a KeyValuePair bean or something) which contain "getOptionValue" and "getOptionLabel" methods (method names match the values in the JSP tag). Struts will look for these methods to retrieve the proper values from each Object in the ArrayList and populate the html tags with them. The "fieldToHoldSelectedValue" field in yourActionForm will be set to the value the user picks when the HTML form is submitted. -----Original Message----- From: Jose Casas [mailto:[EMAIL PROTECTED]] Sent: Monday, March 25, 2002 2:35 PM To: 'Struts Users Mailing List' Subject: dynamic select box Hi, I'm new to struts and was wondering if anybody knew how create a select box with struts. I have a bean which is returning an ArrayList. I want to use this ArrayList as the options in the select tag. What code do I need in my jsp to create this select box? Can somebody please help me? Jose Casas E-Commerce Applications (501) 277-3112 [EMAIL PROTECTED] ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the individual or entity to whom they are addressed. If you have received this email in error destroy it immediately. ********************************************************************** -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>