[Seaside] [goodie] Component naming framework

Derek Brans brans at nerdonawire.com
Sun Jun 15 17:57:19 CEST 2003


> > As an aside, all of my components register themselves relatively as
> > 'parent', so that each component can find its parent.
>
> If this is using dynamic scope, it seems to me that this would only
> (predictably) work from within render methods, no?
>
> If I'm executing a callback of a child component, it's generally
> impossible to dynamically find the parent... or am I missing something?

The component captures a copy of the current naming context for use in the
callback just before it renders itself.  See
WANamingComponent>>renderWithContext:

So, you do have access to the naming context in the callback methods.  See
the example application (called "Naming") to see this demonstrated.

Derek




More information about the Seaside mailing list