struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Duffey, Kevin" <KDuf...@BUYMEDIA.com>
Subject Multiple list box selected items passed in to bean setter method. ..
Date Mon, 09 Oct 2000 19:30:12 GMT
Hi,

Craig (and all), I asked this before and I am not sure what is going on now.
I created a "two" list-box selection setup, where on the left is a list of
items, and on the right is an empty box. In the middle is a -> and a <- that
when clicked moves items from the left to the right, or vice versa. I see
this work on another site and I added it to ours. The actual movement of
items is fine (using JavaScript), and the reson for it is so a user doesn't
have to try to use the CTRL key while selecting many items in a list that
may need to be scrolled. Its a pain in the ass to do this. Furthermore, we
use this same list to allow "modifying" the selected items, and you can
imagine that if the previously selected items are redisplayed selected, you
have to select them all over again, PLUS the new ones you want. So, my
dual-box selection works nicely. However, one problem is happening.

When i move items from the left to the right, they show up fine. If I view
source..the source doesn't show any extra <option value=".."> tags for the
right-side box. I am not sure if this is to be expected..but I would think
that MSIE/Netscape does not update the source in real-time. But, when I
submit the form, for some reason the only values showing up are the ones
that were there when I generated the page. In the bean being populated by
Struts, I have a setXXX(String value). I thought (at least with Orion) that
multiple items are passed in as , separated items. I think you told me to
use a String[] instead. I did this and now the page being displayed says
Argument type mismatch in BeanUtils.populate(java:350). I commented out the
String version, and only have the String[] setter method. I had both as
well. If I use the String version with the String[] commented out, it
works..but only one value seems to be coming in.

So if you could shed some light..that would be great.

Thanks.

Mime
View raw message