2010/4/22 Thiago H. de Paula Figueiredo <thiag...@gmail.com>:
> On Thu, 22 Apr 2010 15:20:13 -0300, Raul Raja Martinez <raulr...@gmail.com>
> wrote:
>
>> Thanks Thiago, Makes sense,
>>
>> What would be the right pattern If I have something like...
>>
>> PageA
>>  - Layout
>>  - Button
>
> Wouldn't it be
>
> PageA
>  - Layout
>  - - Button

Yes if the body of a Layout component is considered a child component
of the Layout and all events triggered from components that are
children would pass through Layout as well when bubbling up.
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.

The event bubbling is acting as if Layout was not part of the
hierarchy as parent but sibling of Button even though is rendered as
part of the Layout body. I'm aware I can roll my own js and have any
component annotated by a mixing or something that triggers the js to
update something that was rendered in Layout, just hopping I could get
events handled in the Layout when necessary.

>
> ?
>
>> Image both Button and OtherButton are components and that Layout has a
>> Growl notification system.
>> I want the growl notification showing up a message when any ajax event
>> triggered by any component anywhere in the system needs to notify the
>> user of something.
>
> Tapestry events are server-side, but you want something to happen
> client-side, so use JavaScript to communicate to some object defined by
> Layout. Ajax.Responders (http://www.prototypejs.org/api/ajax/responders)
> will probably be very useful.
>
> --
> 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
>
>



-- 
Raul Raja

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

Reply via email to