You can do it like this : <html:select name="someForm" property="someProperty"> <option value="-1"><bean:message key="test2"/></option> <html:optionsCollection filter="false" name="someForm" property="cs" value="sequenceType" label="sequenceType"/> </html:select>
Where cs is your list of values. The above will make the "test2" as the first option in the list, which is selected by default. -----Original Message----- From: Søren Blidorf [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 15, 2006 12:57 PM To: Struts Users Mailing List Subject: html:options selected Hi. I am trying to get html:select to work for my purpose. Can anybody help me...... c_stand is a String value from PeopleBean in request.getAttribute("people"); cs is a collection containing values in OptionValueBean. If cs contains values test1, test2 and test3 and c_stand contains test2 I want test2 to be selected in the html:select Is that possible? <logic:iterate id="element" name="people"> <bean:define name="element" id="c_stand" property="c_stand" /> <html:select property="c_stand"> <html:options collection="cs" property="value" labelProperty="option"/> </html:select> </logic:iterate> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]