Hi all I am using <html:select>, and trying to get the drop-down to default to a Boolean value in a bean, ie true, false, or blank if the bean is null. My bean (MyBean) contains the method getMyValue() which returns a Boolean object.
In the code snippet below, the c:out statement confirms that the value of the property is 'true'. I expect that the 'true' option will be pre-selected (which it is if you add "value='true'" to html:select), but doing this dynamically with the c:out tag doesn't work - the blank value is always the one pre-selected. Can someone suggest anything I am doing wrong, or suggest a better approach (i'm relatively new to Struts). <c:out value='${MyBean.myValue}' /><br> <html:select name="MyBean" property="myValue" value="<c:out value='${MyBean.myValue}' />"> <html:option value="" key="jsp.form.booleandropdown.default" bundle="JSP_LABELS" /> <html:option value="true" key="jsp.form.booleandropdown.true" bundle="JSP_LABELS" /> <html:option value="false" key="jsp.form.booleandropdown.false" bundle="JSP_LABELS" /> </html:select> Thanks Matt --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]