Chris,
I've updated IteratorStatus.java to do what you need. For example:
<webwork:iterator status="'status'">
<webwork:if test="@status/modulus(4) == 0"> <br> </webwork:if>
<br>
</webwork:iterator>
This code would embed an extra <br> on every fourth element in the
iterator. See iterators.jsp for more examples.
I also added the methods isOdd() and isEven() as convenience methods since
it is extremely common to alternate row colors in tables.
-Maurice
On Saturday, February 9, 2002, at 02:01 PM, Chris Miller wrote:
> I have a collection, and by using <webwork:iterate> I want to output
> data from the collection as HTML. The catch is, I want to display say 4
> items on each row, then wrap down to the next line. Eg if I had 11 items
> in the collection, I'd want them to display like this:
>
> Item 1 item 2 item 3 item 4
> Item 5 item 6 item 7 item 8
> Item 9 item 10 item 11
>
> I'm struggling to find an elegant way to do this using just the WebWork
> tags. Is it possible? If not, any ideas how can I wrap the line on every
> 4th item without resorting to scriptlets? I was thinking that writing a
> class that was an extension of WebWork's Counter.java might do the
> trick, but that seems like overkill.
>
> Chris
>
> _______________________________________________
> Webwork-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/webwork-user
>
_______________________________________________
Webwork-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webwork-user