You need to follow the same guidelines for selects as for checkboxes:
ensure you reset the underlying form bean property each time.
http://struts.apache.org/userGuide/struts-html.html#select
L.
GnomeKing wrote:
Hi guys,
I've got a problem I've been trying to get around for a while and I'm
hoping someone here can give me some pointers!
I have to use a multi page form for a particular bean, and one of the
latter pages has an html:select control which allows multiple
selections. It also has a checkbox.
The problem I have is that when I am editing a previously saved bean,
I can't figure out how to catch that the page has been submitted when
no selections had been made from the multiple selection box.
At least one item in the selection must be selected - and that is
checked in the validation - but if no entries are selected in the HTTP
request, the setItems is not invoked, and so it just thinks its using
the same Items as were selected when we started editing the bean!
(I do hope I'm making sense here...)
I had the same problem with the checkbox, but solved that one by
converting it into a single-select html:select with just two options
(enabled/disabled). I can't think of a way to do the same for this
problem.
Unfortunately I cannot rely on javascript as the webapp must be able
to support browsers which have javascript disabled.
Does anyone have any ideas?
Thanks,
Bob
--
Laurie, Open Source advocate, Java geek and novice blogger:
http://www.holoweb.net/laurie
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]