You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Szemere Szemere <sz...@googlemail.com> on 2008/01/14 20:53:03 UTC

Loops in .tml calls Java calls components

How can Tapestry 5 handle a scenario where I have a loop in a .tml file that
calls method in the page.java which then calls components to render (e.g.
PageLinks)?

Can someone point me towards example code?

Tks

Re: Loops in .tml calls Java calls components

Posted by Josh Canfield <jo...@thedailytube.com>.
All of the components that you are going to render need to be referenced in
your page's .tml file. You can wrap your PageLinks component in an <t:if> to
conditionally render it. If you have multiple blocks you want to chose from
consider using <t:block> and <t:delegate> with a method in your
page.javathat returns the appropriate block.

Josh

On Jan 14, 2008 11:53 AM, Szemere Szemere <sz...@googlemail.com>
wrote:

> How can Tapestry 5 handle a scenario where I have a loop in a .tml file
> that
> calls method in the page.java which then calls components to render (e.g.
> PageLinks)?
>
> Can someone point me towards example code?
>
> Tks
>



-- 
--
TheDailyTube.com. Sign up and get the best new videos on the internet
delivered fresh to your inbox.