In a multi select box , unless user select option(s) , will it not be possible to send the values back to the server ,in the form of request parameter
For example i have dual multi select box where user can add his selection from one list box to the one on right by clicking on a button or remove [it re-populates the one on left ]
in this scenerio when i access the value of the select box , i dont get any values there unless if its selected
Yes.. it is actually a round about way, how I achieved this... you can try the same..
Thus, on submit, all the values in the second select box would be submitted along with the form, and you can get them as request.getParameterValues()
Joined: Jul 17, 2006
Hi thanks for the reply
I am doing it in the same way ,but as you do selected = true they all get selected [i mean they appear to be selected] but
it should not be that way ,is there any way
Joined: Apr 26, 2007
Another way, is to create a hidden field, and again, just before submitting the form, iterate through your second multiselect box, and add the option values to this hidden field [comma separated or something like that], without actually selecting any of the options - and then submit the form. In server side, you can get the value of the hidden field, and hence know what are the options in that second box.
By the way, just curious, what is stopping you from using the first solution?