You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Teh, Kah Loong" <te...@uwec.edu> on 2002/08/23 18:49:48 UTC

question

I'm trying to create a drop down Combo Box that allows 
a user to select a choice out of many from a given list.
This would sort of be like an update process for an 
existing database entry.

I would like to display the original data as the default 
entry for the combo box.
According to the API, this can be done by setting the 'value' 
attribute for <html:select>, i have tried doing so but was not
successful.
The default value that is displayed on the combo box happens to 
be the first value returned from the List, i.e. CDRRoomUseList


I have written the following code segment :

// bean declarations
<jsp:useBean id="CDRRoomUseList"    class="java.util.List"
scope="request" />

// for generating the drop down combo box 
<html:select property="room.CDRRoomUseID" value="<%=
Room_Obj.getCDRRoomUseID_desc() %>" >
     <html:options   collection="CDRRoomUseList" property="CDRRoomUseID"
                     labelProperty="CDRRoomUse" />
</html:select>


I have even tried doing :
<html:select property="room.CDR..." value="test" .... >

but this did not work as well.


Can anybody point me towards the right direction?

Thanks for any help in advance.


Kael
Facilities Planning
University of Wisconsin - Eau Claire


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>