Stupid question, is the value supplied by the form exactly equal to one of the values supplied by the collection?
Edgar -----Original Message----- From: Beeson, Ashley [mailto:[EMAIL PROTECTED]] Sent: Thursday, November 21, 2002 7:33 AM To: '[EMAIL PROTECTED]' Subject: Html:select doesn't select correct element.. I have a problem with html:select not setting selected="selected" for the correct item in a list of options. The weird thing is that it works fine for all bar one of my pages. I have checked that the property being passed in exists in the list of options using a bean:write just above the html:select statement. channelCommodity has the value of one of the elements 'code' in our collection. A snippet of the code I'm using which doesn't work properly: <bean:define id="commodities" name="CHANNELEDITFORM" property="commodityUnits" /> <html:select size="1" property="channelCommodity"> <html:options collection="commodities" property="code" labelProperty="display"/> </html:select> A snippet of the code I'm using which works correctly on another jsp page: <bean:define id="statuses" name="MEASURINGDEVICEEDITFORM" property="energisationStatuses" /> <html:select size="1" property="energisation"> <html:options collection="statuses" property="code" labelProperty="display"/> </html:select> I should point out that there are no errors with the pages displayed apart from the missing selected="selected" for the element that should be selected. This is using struts 1.0.2 and running on tomcat 4.0.4. Any suggestions? Cheers ____________________________ Ash Beeson - IT Consultant email: <mailto:[EMAIL PROTECTED]> [EMAIL PROTECTED] This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you. -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>