<table>
<span jwcid="@Foreach" source="ognl:list" value="ognl:currentValue"
element="tr">
<td>
<span jwcid="@Insert" value="ognl:currentValue.foo"
/>
</td>
</span>
</table>
> -----Original Message-----
> From: news [mailto:[EMAIL PROTECTED] On Behalf Of Michael Campbell
> Sent: Tuesday, November 29, 2005 11:02 AM
> To: [email protected]
> Subject: What's the pattern?
>
>
> I'm a brand new Tapestry user, so I'll probably be having a lot of
> silly questions for a while... a priori apologies for that.
>
> I'm looking at converting an existing application, and one commonly
> used idiom there is that it displays a table of items. The way it
> does this is that it iterates over the list of the items, using a jsp
> tag which "knows" what the index of the list is.
>
> It uses this index along with a modulo operator to insert a new row in
> the table if the number of columns is some fixed value.
>
> Something like this:
>
> <tag:iterate list="myItemList">
>
> <!-- normal html stuff here -->
>
> <tag:if "list.index % 4 == 0">
> <!-- end this row, start a new one... -->
> </tr>
> <tr>
> </tag:if>
> </tag:iterate>
>
> I think I'd use the @ForEach component for the iteration, but what's
> the "tapestry way" of making new rows?
>
> Thanks
>
> --
> Michael Campbell
>
>
> ---------------------------------------------------------------------
> 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]