What I meant was that in the html:select tag ignore the "value" parameter. Do not use the html:options but rather iterate through all of your possible values and print out the html for option yourself. Then you can specify which options are selected just as you would in normal html.
-----Original Message----- From: Paul Sijpkes [mailto:[EMAIL PROTECTED]] Sent: Monday, January 28, 2002 8:12 PM To: 'Struts Users Mailing List' Subject: RE: pre-selecting multiple selects You mean to set the option label as selected? eg. '**Option**' to symbolise selected and 'Option' as unselected. This is a pretty messy solution, but it may have to do. I will see if I can modify the source code for a more elegant result, allowing for time constraints. regards, Paul. -----Original Message----- From: Jakkampudi, ChandraseKhar [mailto:[EMAIL PROTECTED]] Sent: Tuesday, 29 January 2002 12:45 PM To: 'Struts Users Mailing List' Subject: RE: pre-selecting multiple selects I had the same problem on a previous project. I looked at the source code and currently you can specify only one value. A workaround is to check the values yourself and set the selected option on the options. Alternatively you can get the modify the source. If you do this, I hope you can post your solution back to this list. regards, JC -----Original Message----- From: Paul Sijpkes [mailto:[EMAIL PROTECTED]] Sent: Monday, January 28, 2002 7:29 PM To: Strust-User (E-mail) Subject: pre-selecting multiple selects Hi all, I've written an input form that uses a multiple <html:select>. The user selects the options they want and these options are subsequently inserted into the database. The problem is, that due to an apparent limitation of the html:select "value" property, if I want to use it to update the database, that is, I want the user to both be able to de-select existing selections as well as select new ones, I don't seem to be able to. This is due to the fact that the "value" field can only take a single value! That is, I can set the value to "-1", so that each pre-selected field is set to -1, but if these are re-selected I have no way of telling which record was re-selected! And if it was de-selected I can't tell which record I should delete! I want to be able to pass a Collection object bean to the value field instead, so that all values in the Collection object are pre-selected so that these values are also meaningful when passed back to my Action (or not). I would love some feedback from anyone that may have a work-around for this, if not it is a serious limitation of the html:select tag. regards, Paul -- 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]>