Jonathan wrote:
> Edit/Create Meeting.jsp select and options-collection tags
> ----------------------------------------------------------
> <stripes:select name="meeting.attendedBy.id" value="meeting.attendeedBy.id"
> multiple="true" size="5">
> <stripes:option value="">--Select Attendeed By--</stripes:option>
> <stripes:options-collection collection="${actionBean.allPeople}" value="id"
> label="name"/>
> </stripes:select>
>
Stripes needs a list of currently-selected IDs (even if it's empty):
In meeting:
private Set<Long> attendedByIds; // + getter/setter
Then your select:
<stripes:select name="meeting.attendedByIds" multiple="true" size="5">
<stripes:option value="">--Select Attended By--</stripes:option>
<stripes:options-collection collection="${actionBean.allPeople}"
value="id" label="name" />
</stripes:select>
Stripes populates the list with the "allPeople" property. It figures
out which one to pre-select when it renders the select by
"meeting.attendedByIds". When the user submits the form, it fills up
"meeting.attendedByIds" with the ids of all the people the user
selected. I think you simply mixed up your inputs and outputs.
HTH,
Scott
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users