[Seaside] Menu component - communicating with root component

Ramon Leon ramon.leon at allresnet.com
Sun Apr 20 18:29:47 UTC 2008

> >   
> How does the child tell the parent of the event if it doesnt 
> know the parent.

It doesn't know who it's telling, it just launches the announcement.

> Are you suggesting that every child has an announcer, and 
> that the parent registers an interest in events happening to 
> the child, when it adds the child. The problem I see with 
> that is that it expects all of the parents to do the wiring 
> to all of the children, thats a lot of wiring.
> And parents are a multitude of generic components such as 
> rendered PRPages with an embedded component at some arbitary depth.
> Keith

Not at all, it's up to you to decide where to put the announcer, but just
think of it as a global communications channel, put one on the session so
that parents don't need to know their children either.

self session announce: MyAnnouncement new.

Then any component, when initialized, can register itself as interested in
certain announcements.  The root component for example might register as
interested in the ReloadBody announcement.  So it doesn't matter who fires
it or from where, it'll catch it and act accordingly.

Ramon Leon

More information about the seaside mailing list