Sri, I solved my problem by doing a workaround. nothing great, but it would have been great if i didn't need to.
Thanks for the input! Kael -----Original Message----- From: Sri Sankaran [mailto:[EMAIL PROTECTED]] Sent: Friday, August 23, 2002 3:28 PM To: Struts Users Mailing List Subject: RE: <html:select> question Are you sure it doesn't work? I have had Struts implicitly convert booleans to String. If it doesn't work you could always set up a dummy getter: public String getFoo() { return "" + room.CDRRomUseID; } and use 'foo' as your property value. Sri -----Original Message----- From: Teh, Kah Loong [mailto:[EMAIL PROTECTED]] Sent: Friday, August 23, 2002 4:15 PM To: Struts Users Mailing List Subject: RE: <html:select> question Sri, Thanks for your suggestion. Sorry i should have provided more details in my original question with the same following code : <html:select property="room.CDRRoomUseID" value="<%=Room_Obj.getCDRRoomUseID_desc() %>" > <html:options collection="CDRRoomUseList" property="CDRRoomUseID" labelProperty="CDRRoomUse" /> </html:select> var types : room.CDRRoomUseID - int value = String the options block is essentially recording CDRRoomUseIDs (of type int) to be saved to room.CDRRoomUseID, the display however, would be strings (labelProperty = CDRRoomUse) therefore your suggestion would not take hold. Do you have any more suggestions? help much appreciated. Kael -----Original Message----- From: Sri Sankaran [mailto:[EMAIL PROTECTED]] Sent: Friday, August 23, 2002 12:01 PM To: Struts Users Mailing List Subject: RE: <html:select> question You don't need the value attribute. All you have to do is set the property attribute of the <html:select> (room.CDRRoomUseID) to the value you want displayed by default. For example, if room.CDRRoomUseID is set to 'foo' and 'foo' is one of the value in the collection CDRRoomUseList, it will show selected when the page loads. Sri -----Original Message----- From: Teh, Kah Loong [mailto:[EMAIL PROTECTED]] Sent: Friday, August 23, 2002 12:50 PM To: [EMAIL PROTECTED] Subject: <html:select> 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: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>