This topic had come up a few times. I agree that a serverside pub sub mechanism would be great for decoupling.
I've got a few ideas for how it would work. It would be nice if subscription handlers could be done via annotations or naming conventions, similar to event handlers. On 3 Sep 2014 23:09, "Geoff Callender" <geoff.callender.jumpst...@gmail.com> wrote: > I think the issue here is that he'd like one deeply nested component, > let's call it Z, to be refreshed when another deeply nested component, > let's call it N, that doesn't know about Z, is refreshed. > > One way is to bubble up an event from N until it reaches a common parent, > C, which in this example is the parent of the layout. C then calls > component.doChangeOfNotifications(), which calls > componentA.doChangeOfNotifications(), which calls ... etc. .. which calls > Z.doChangeOfNotifications(). Messy, with lots of components needing new > method doChangeOfNotifications. You can see something like this in: > > > http://jumpstart.doublenegative.com.au/jumpstart7/together/ajaxcomponentscrud/persons > > where Persons, which is the page, calls list.doChangeOfSelectedPerson() in > response to several bubbled-up events. > > Ideally, a synchronous pub-sub server-side could solve it. N would publish > and Z would subscribe. Z would use AjaxResponseRenderer to add its zone to > the render list. Unfortunately, I don't know of such a mechanism. > > Any other suggestions? > > On 4 Sep 2014, at 3:51 am, Thiago H de Paula Figueiredo < > thiag...@gmail.com> wrote: > > > On Wed, 03 Sep 2014 13:40:53 -0300, Sumanth <roasteddra...@gmail.com> > wrote: > > > >> Hello Experts, > > > > Hi! > > > >> > >> I have encountered one more hurdle now regarding zones, > >> > >> I have a layout > >> component>componentA>componentB>componentC>NotificationComponent>Zone > >> > >> This zone is a count zone and is updated using a mixin > (periodiczonerefresh > >> mixin). > >> > >> I have a notification page in which i have a Zone(a table inside a zone > >> containing notifications) and an actionlink to delete the selected > >> notifications.(bulk delete). On delete of these notifications i want the > >> count which is in layout component (mentioned above) to be updated. > >> > >> How can i do it? > > > > The easiest way is to define the id of the zone to be updated and use > its addRender(String clientId, Object renderer) to update it. > > > > -- > > Thiago H. de Paula Figueiredo > > Tapestry, Java and Hibernate consultant and developer > > http://machina.com.br > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > > For additional commands, e-mail: users-h...@tapestry.apache.org > >