You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by dh...@lexmark.com on 2001/04/18 18:54:15 UTC
Setting Select value= dynamically?
Hi. Am aware that you can set value= on html:select tag, as "the value to
compare with for marking an option selected". For example, in the code below,
to display "08" when jsp loads
<bean:define id="dayList" name="LogFilterForm" property="days"/>
<html:select property="day" value="08">
<html:options collection="dayList" property="value"
labelProperty="label"/>
</html:select>
Before this jsp, I am filtering some records and want to set the day to the
earliest one found. How do I do this?
I set the value of "day" in my FormBean to the one found, but how do I get this
one selected when jsp displayed?
Do I need to use some kind of scriplet?
Many thanks,
Dave