Curtis Taylor wrote:

You're creating the bean "status" in the varStatus declaration in your c:forEach action. It's in scope in the loop as "status" already, so you don't need to re-initialize it. You can access its attributes inside your loop:

<c:out value="$status.begin" />
<c:out value="$status.count" />
<c:out value="$status.index" />

...etc.
*sigh* You are, of course, correct. I could have sworn I tried that. I certainly swore.

Just curious; what're you trying to do inside the loop?
The old 'alternating-table-row-color' trick.

<c:forEach items="${ScheduleDetailsForm.eventsList}"
        var="event"
        varStatus="status">

  <c:choose>
    <c:when test="${status.count%2 == 0}">
      <%-- set style for EVEN rows --%>
  <c:otherwise>
      <%-- set style for ODD rows --%>
  </c:choose>

</c:forEach


No doubt there's a better way of doing that too.


Many thanks Curtis.

--
bOOyah


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



Reply via email to