[Seaside] Re: lightbox: inside child components

Edward Stow ed.stow at gmail.com
Sat Apr 19 21:44:22 UTC 2008

On Sat, Apr 19, 2008 at 11:34 PM, Squeaker <squeakman at gmail.com> wrote:
> Esteban Lorenzano wrote:
> > Of course, If I do: self grandParent lightbox: blah, everithing works fine
> (#grandParent does not exist, is just an example... I know is not the
> correct design).
> > So, #lightbox: does not work in child components with two levels of
> penetration.
> >
> >
>  My understanding of your problem is that you have a containment hierarchy
> of objects and you want some object deep in the hierarchy to tell objects
> higher up that something of interest happened. And to do this with loose
> coupling.
>  The approach that I took to solve this problem was to use Announcements.
> When I am building my containment hierarchy (A contains B who contains C
> etc) I am careful to have A register for announcements from B.  B can choose
> to propagate announcements originating from C up to A.
>  I am not sure if this is the standard way to do things or if it is correct
> but it works.  The downside is that it takes quite a bit of setting up - all
> those Announcements with their #when:do: messages.
>  What do others think? Is this an acceptable solution? Is there a better
> way?

I have exaclty the same problem -- nested components that need event
propogation.  In another thread running at the moment Keith Hodges
(Menu component - communicating with root component) has expressed
similiar issues.

I'm thinking would some sort of event / announcement  bubbling in
nested components (aka html dom) would be a good idea ?


Edward Stow

More information about the seaside mailing list