html:option + jstl

Hi

I have the dropdown list, i want to use EL to show which value is selected dynamically. how can I i achieve this

<html:select property="msgCd" styleClass="inputbox">

<html:options collection="messageTypeCdList" property="dataElementValueCode" labelProperty="valueCodeValueNameString"/>

</html:select>

something like....

<html:options collection="messageTypeCdList" value="${benefitVO.msgCd}" property="dataElementValueCode" labelProperty="valueCodeValueNameString"/>

so that the appropriate value is selected from the VO which comes from DB instead of defaulting to the first selection.

but I checked the tag dosent support value attribute.

any ideas...

thanks

[980 byte] By [sai_suna] at [2007-11-26 16:21:37]
# 1

found the solution...

here it is..

<html:select property="msgCd" styleClass="inputbox" value="${benefitVO.msgCd}">

<html:options collection="messageTypeCdList" property="dataElementValueCode" labelProperty="valueCodeValueNameString"/>

</html:select>

sai_suna at 2007-7-8 22:45:18 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...