Wow Thiago, that is pretty cool. I haven't found (/noticed) this in the docs
yet, can you provide a pointer?

-- 
Chris

On Fri, Sep 23, 2011 at 5:27 PM, Thiago H. de Paula Figueiredo <
thiag...@gmail.com> wrote:

> On Fri, 23 Sep 2011 10:23:50 -0300, Boris Horvat <horvat.z.bo...@gmail.com>
> wrote:
>
>  I probably din't explain it very well.
>>
>
> I disagree. :) I guess I haven't explained my suggestion well.
>
>  I have component with two submit links in it. I also have a page that
>> includes those two links. I need to write in that page that includes the
>>
>> components the event handling for those two links but I am not sure how.
>> If I write handler in the Component.java it is handled but if I write it in
>> the Page.java class it is not handled.
>>
>
> This happens because you're specifying the component id in your event
> handler method, which is local to the component or page at which it was
> declared.
>
>
>  Is there a way to push the event from the component up to the page?
>>
>
> Non-render events in components are bubbled to the page unless someone
> handles them in between. Just use event name instead of component id in your
> handler method, as I've suggested before. ;)
>
> <t:submit event="event1"/>
> <t:submit event="event2"/>
>
> In your page:
>
> void onEvent1() { ... } or void @OnEvent("event1") anyName() { ... }
>
> void onEvent2() { ... } or void @OnEvent("event2") anyOtherName() { ... }
>
>
> --
> Thiago H. de Paula Figueiredo
> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
> and instructor
> Owner, Ars Machina Tecnologia da Informação Ltda.
> http://www.arsmachina.com.br
>
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: 
> users-unsubscribe@tapestry.**apache.org<users-unsubscr...@tapestry.apache.org>
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>

Reply via email to