I usually put the component inside a block and use it in both locations:

<t:if ...>
    ...
    <t:delegate t:to="linkBlock">
    <p:else>
          ...
        <t:delegate t:to="linkBlock">
    </p:else>
</t:if>

<t:block t:id="linkBlock">
    <a t:type="ActionLink" t:id="link">Foo</a>
</t:block>

While the markup looks slightly messier, this saves you from having two
event handlers for the same thing.

Cheers
Henning

-----Original Message-----
From: Thiago H. de Paula Figueiredo [mailto:thiag...@gmail.com] 
Sent: Friday, August 07, 2009 3:50 PM
To: Tapestry users
Subject: Re: Possible render problem/bug

Em Fri, 07 Aug 2009 10:47:29 -0300, Sebastian Hennebrueder  
<use...@laliluna.de> escreveu:

> I found this work around as well but this would require a second event  
> listener method.

You can use @OnEvent("action") in that case.

> But I suppose that the ids need to be unique on the Tapestry component  
> tree, so the fact that  the id is unique on the rendered result is not  
> relevant.

Absolutely right.

> As a consequence, I will need the second event listener (not really a  
> problem)

Not quite. :)

-- 
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to