Ok spent too much time on this already so I am looking for help :)

Action has two lists.

List availablePeople;
Interger[] selectedPeople;

The availablePeople is the complete list of people objects, say 50 of them.
The selectedPeople array is the subset of those people's ids who
should be selected by default.

Does not select the checkboxs but the index is correct.
<c:forEach items="${actionBean.availablePeople}" var="person"
varStatus="status">
    <stripes:checkbox name="selectedIds[${status.index}]"
value="${person.id}" checked="${actionBean.selectedIds}" />
${person.name}
</c:forEach>

Selects the right checkboxes but I lose my idexes..
<c:forEach items="${actionBean.availablePeople}" var="person"
varStatus="status">
    <stripes:checkbox name="selectedIds[]" value="${person.id}"
checked="${actionBean.selectedIds}" /> ${person.name}
</c:forEach>

------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to