Using JSTL tags and assuming you have a collection of elements named
"elements" in some scope:

<table ...>
<c:forEach var="element" items="${elements}" varStatus="status">
<c:if test="${(status.index % 10 == 0) && !status.first}"></tr></c:if><c:if
test="${status.index % 10 == 0}"><tr></c:if>
<td><!-- put data here --></td>
<c:if test="${status.last}"></tr></c:if>
</c:forEach>
</table>

robert

> -----Original Message-----
> From: Otávio Augusto [mailto:[EMAIL PROTECTED]
> Sent: Sunday, December 28, 2003 10:58 PM
> To: [EMAIL PROTECTED]
> Subject: Testing iterator quantity
>
>
> Is there a way to know how many times i've iterated over a
> collection, using struts tags ? for instance: i have an iterator
> with 100 elements. I want to put each 10 elements in a different
> row of a table. Does anybody have an idea?
>
> thanks
>
> Otávio Augusto
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


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

Reply via email to