I am trying to pass the multple selected items on a s:select onto a
List<Serious> that I have on an "some" object:

Some{
List<Serious> seriousness; ...}

I am using spring to inject "some" in my action:
<bean id="some" scope="prototype"
                class="package.SomeClass">
        </bean>

Using a:
<s:select multiple="true" value="%{#some.seriousness.{id}}"  multiple="true"
name="some.seriousness.id"  list="activeIngredients" listKey="id"
listValue="name" />

I'm facing an issue: the some.seriousness is being injected with multiple
Serious objects, with some repetitions of selected elements.  If I select 2
elements, I'll get a list with size 4 (2x each one), sometimes more.

I've also tried with name="some.seriousness", but this one goes directly to
input result (indicating an error in populating the fields).

Note that if name="seriousList" and I can successfully see selected items if
I declare an Integer[] in the action:

Integer[] seriousList; 

Does anyone know how to successfully inject the selected values onto the
object's list.


-- 
View this message in context: 
http://old.nabble.com/Can-s%3Aselect-multiple-have-a-object.someList-as-name--tp26324775p26324775.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to