Dear all,
I used to have a Select list where only a single option could be selected. It worked fine.
After the page was submitted (with the action set to the same page), the select list still contained
the same select option as was chosen right before the submit.
Of course, this is due to the value="..." in the
jsp:setProperty tag in the code below.
Now, I learned how to change this all into a Select list with multiple options. It works fine still, with one
small exception. The selection gets lost. I assume this is because ${param['multiSelect']} is converted
to a
String here, or one cannot set the initial values like this?
Could somebody explain me how to do this? Or should I do it myself with some JavaScript?
(I know how to do that, but I thought it should not be necessary).
Thanks in advance.
Here's the relevant part of my sources:
The thing I learned was to simple use String arrays in the bean: