On Tue, 10 Jan 2012 21:23:03 -0200, bhorvat <[email protected]>
wrote:
I have a component Header and in there I have a menu. What I want is
that on the click in that menu I refresh two ajax zones one in the
header (the ajax zone in which is the menu) and the other which is in
the main page. How can I best propagate the event, or should I use
another way like injecting zone in the header component?
Having a component change things outside it is not a good idea in
principle. Try to avoid this kind of situation.
I'd try adding a parameter to both Header and Menu which would receive
which external zone to update and make the page use it.
The major problem is that I need first that the method from the Header
component (this method sets what is clicked in the menu) activate first
and then the one in the main page (it fills the main page with data
based on the selected category from the menu)
Handle the event in Header and, inside the handler method, trigger an
event with the same name using ComponentResources.triggerEvent().
--
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: [email protected]
For additional commands, e-mail: [email protected]