andy wix wrote the following on 11/15/2004 12:58 PM:
Hi,

Thanks for the input Robert, but the array will be shorter than the arraylist whenever a checkbox is not selected.

I've had a look at Rick Reumann's Struttin with Struts lesson 3 which does something similar and now have:

<c:forEach var="service" items="${services}" varStatus="status">
<TR>
<TD><c:out value="${service.name}"/></TD>
<TD
<html:multibox name="serviceForm" property="selectedServices"><c:out value="${service.status}"/>
</TD>


 </TR>
</c:forEach>

This is a step in the right direction but still doesn't work (the checkboxes aren't checked when viewing the page even though they should be set). The service.status field in the service class is a byte - does this have to be a String?

What does the source code of the resulting HTML look like? I probably shouldn't have used status a property of service since it looks confusing since I'm using "status" to represent the index status also for the varStatus attribute. I 'should' change the service property to something other than status.


Or you positive you have your Collection of "selectedServices" being set before you get to the JSP?

I'm also not sure about a byte comparison either.

--
Rick

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to