> What would be the right pattern If I have something like... > > PageA > - Layout > - Button > > PageB > - Layout > - OtherButton
PageA { @Component private Layout layout; Object onButtonEvent(String eventArg) { return layout.handleButtonEvent(eventArg); } } PageB { @Component private Layout layout; Object onOtherButtonEvent(String eventArg) { return layout.handleOtherButtonEvent(eventArg); } } On Thu, Apr 22, 2010 at 11:20 AM, 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 > > PageB > - Layout > - OtherButton > > 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. > > 2010/4/22 Thiago H. de Paula Figueiredo <thiag...@gmail.com>: >> On Thu, 22 Apr 2010 14:40:26 -0300, Raul Raja Martinez <raulr...@gmail.com> >> wrote: >> >>> Hi, >> >> Hi! >> >>> Is it possible to handle events inside components that have been >>> triggered by other events? >> >> Events are triggered by components, not by events themselves. >> >>> If a page does not handle an event wouldn't that event be bubbled up >>> to the Layout component since it wraps it? >> >> It depends on who triggers the event. If it is the page itself, no, as the >> layout wraps the content of the page, but the layout is inside the page. If >> it's a component declared inside the layout, then yes. >> >>> We are trying to figure out a way for events to be handle inside the >>> Layout component as parts of the UI need to be updated there. >> >> Components should try to handle its own events. >> >> -- >> 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 > > -- -- http://www.bodylabgym.com - a private, by appointment only, one-on-one health and fitness facility. -- http://www.ectransition.com - Quality Electronic Cigarettes at a reasonable price! -- TheDailyTube.com. Sign up and get the best new videos on the internet delivered fresh to your inbox. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org