It's not the exact subject, but this reminded me of a problem I had a while ago 
related to Layout and Page's Forms submission events.

If the Layout component has a Form component (for whatever reason), every Page 
injected into it needs to handle their Form submission lifecycle by the 
explicit Form ID. So, for example, the handy "onSuccess()" event method should 
explicit both Form ID's (onSuccessFromLayoutForm() and 
onSuccessFromPageForm()), or else it would handle always only one of them (I 
don't remember whom, though).

I know that this is kinda logical, but I think it makes some things harder for 
a tiny reason.

Thanks!

- Everton




________________________________
De: Thiago H. de Paula Figueiredo <thiag...@gmail.com>
Para: Tapestry users <users@tapestry.apache.org>
Enviadas: Quinta-feira, 22 de Abril de 2010 15:56:13
Assunto: Re: About event handling in Layout component

On Thu, 22 Apr 2010 15:45:53 -0300, Raul Raja Martinez <raulr...@gmail.com> 
wrote:

> Yes if the body of a Layout component is considered a child component
> of the Layoutand all events triggered from components that are
> children would pass through Layout as well when bubbling up.

Right.

> If that was the case firing an event inside Button.java could be
> handled by Layout.java. Really what's happening is that the handle
> work if I place it in PageA.java but not when placed in Layout.java.

Button is declared in PageA's template, so it's an PageA child, so events 
triggered by Button are not handled by Layout.
Just what is declared in the Layout template is considered a child of it by 
Tapestry.

--Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and 
instructor
Owner, software architect and developer, Ars Machina Tecnologia da Informação 
Ltda.
http://www.arsmachina.com.br

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


      

Reply via email to