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]>

Reply via email to