At first I used myList for the first field with multiple select and it
worked. When I wanted to have two fields with multiple select I took myList
out of the picture by commenting it out and used two new lists myList1 and
myList2.
However, in the methods getEncoder() and getModel() I originally used myList
in the inner for loops that go through myList respectively like this,
-------------------
for(MyObject myObject: myList)
if(myObject.getId().equals(Integer.parseInt(value))){
objects.add(myObject);
}
------
for(final MyObject myObject: myList){
options.add(new OptionModelImpl(myObject.getName(),
myObject));
}
--------------------
Now that I want to use myList1 and myList2 I don't know how to deal with the
methods getEncoder and getModel in terms of what to replace myList with!!
I'm not getting error messages with the code above, it's just when I select
multiple values from the two fields and submit the form, I expect the two
lists interestCodes and ficeCodes to have values but what I'm getting is
empty lists.
interestCodes and ficeCodes are used in the tml file like this:
<t:MultipleSelect value='interestCodes' model='myList1' encoder='encoder'/>
<t:MultipleSelect value='ficeCodes' model='myList2' encoder='encoder'/>
They are defined in the java file as:
@Property
private List<MyObject> interestCodes;
@Property
private List<MyObject> ficeCodes;
Any insights would be highly appreciated!
--
View this message in context:
http://tapestry.1045711.n5.nabble.com/Tapestry-5-2-5-Select-component-s-multiple-property-tp4304338p5713981.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]