You have to have getter /setter methods for country_code and country_name. You can retrieve all the countries from the county_listing and store them in a collection countrylist. Then your label property will be country_name but the value you get will be country_code. Then you can insert codes in address table.
<html:select property="country_code"> <html:option value="0" key="prompt.select"></html:option> <html:options collection="countrylist" labelProperty="country_name" property="country_code"/></html:options> </html:select> -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 19, 2003 9:36 AM To: [EMAIL PROTECTED] Subject: using select with country codes Hi guys I have a db table called "country_listing" which contains "contry_codes","country_name". I also have an "address" table which holds the country_code. I need to implement a select which shows these "country_names" in the select box and the when the user choses a country the "country_code" has to be inserted into the "address" table. Please let me know how to do it if anyone has done it. --Thank you Mohan --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] **************************************************************************** This email may contain confidential material. If you were not an intended recipient, Please notify the sender and delete all copies. We may monitor email to and from our network. **************************************************************************** --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]