My intention was that page selects its own layout, not which block gets
rendered. I am using the block and delegate for other purposes. If the
layouts don't differ much then one can use parameters for the layout and
then conditionally renders parts of the layout so it looks different. I
wanted to have several simple layouts which a page can choose for itself,
which I think is more "clean" then having one with a lot of blocks and ifs.

-Borut

2009/5/14 Thiago H. de Paula Figueiredo <thiag...@gmail.com>

> On Thu, May 14, 2009 at 7:12 AM, Borut Bolčina <borut.bolc...@gmail.com>
> wrote:
> > You probably mean that I would have one layout component, but with
> > conditional blocks and not several layouts chosen dynamically?
>
> Not exactly. You can define one block per layout and use delegate to
> render one of them. The choosing logic stays in the page class.
> There's one example here:
>
> http://tapestry.apache.org/tapestry5.1/tapestry-core/ref/org/apache/tapestry5/corelib/components/Delegate.html
>
> --
> Thiago
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>

Reply via email to