thanks DH and Peter for the reply .. Peter, you have gave me some hints , I think I know which approach should I use then ...
By the way , there is one more question , can we listen to an event and act in ajax way, meaning without refresh the whole page ? For example, when I click "New record" icon on the toolbar, the best is , we just clear all the field, and no need to call to reload the whole page. At the moment , I use the Zone to archive that , but the toolbar is not a component at the moment , I am not sure if I make the toolbar as an component , this trick still works or not ... CG On Tue, May 5, 2009 at 4:16 PM, Peter Stavrinides <p.stavrini...@albourne.com> wrote: >>In my understanding, there should be no way. > Perhaps its not recommended, but if you have the ComponentResources for that > component then you should be able to trigger the event you want. > > Look at this service: > @Inject > private ComponentSource componentSource_; > > It allows you to look up any component / page, which in turn means you can > get the component resources, and then trigger the event. > > Peter > > ----- Original Message ----- > From: "DH" <ningd...@gmail.com> > To: "Tapestry users" <users@tapestry.apache.org> > Sent: Tuesday, 5 May, 2009 04:53:58 GMT +02:00 Athens, Beirut, Bucharest, > Istanbul > Subject: Re: [T5] How to listen/trigger event in componentA from component B ? > > In my understanding, there should be no way. Events can only be listened in > itself or its parents. > > DH > ----- Original Message ----- > From: "CG" <learn....@gmail.com> > To: <users@tapestry.apache.org> > Sent: Monday, May 04, 2009 11:57 PM > Subject: Re: [T5] How to listen/trigger event in componentA from component B ? > > > Hi , anybody can give some hints? thanks > > CG > > On Sat, May 2, 2009 at 1:39 AM, CG <learn....@gmail.com> wrote: >> Hi all, >> I have been using T5 in my project for 1 year , and thanks for the >> great framework. I am neither an expert in Tapestry nor Java, >> therefore, would like to seek some help from all of you to assist on >> my problem . >> >> By checking the Grid source code , I know that TriggerEvent can used >> to trigger event from a component to it's container component. >> Nevertheless, I would like to know whether in T5 , we can do the same >> thing between 2 components that in the same container. >> >> To be more specific, I have a Toolbar component, and another component >> which contain several fields (named as component X) in the same page, >> when user click on an icon in toolbar , I would like the component X >> do some action , for example, refresh the fields , submit or etc. >> >> How should I code to archive that ? Which function/API should I use , >> any source code that I can refer to ? >> >> >> Thanks in advanced for any hints or guidance . >> >> Cheers :) >> CG >> > > --------------------------------------------------------------------- > 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 > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org