[Seaside] Re: Re: Re: Re: Ajax callback question: how toupdatecomponenttreebefore #children gets called?

Lukas Renggli renggli at gmail.com
Fri Feb 8 23:23:29 UTC 2008

>   > Callbacks are normally processed in the context of the component that
>   > defines them (the owner).
> ... the component that presents a callback need not be the one that
> "defined/owns" it. Not so much "homeless", more like "bind-and-relocate"
> (bind: r1 or r2, relocate: from house to r1, r2).

Yes, why not. The updater could be written like:

     html updater
          id: TheTabTestPanel id;
          callback: [:r |
               r withOwner: anotherComponent do: [
                    anotherComponent add: (SUCounterTest new) label: 'another'.
                    anotherComponent renderBodyOn: r ] ]);
          with: 'AJAX add from nested SUCounter' ]

The question is rather, if I want to explain that to anybody ;-)

> > Pay attention to use the right renderer. Even if it mostly works, I
> > just noticed that there are some places where you use html within an
> > AJAX callback.
> Yikes! Even *I* should know better than to do that. A Lint smell?

The latest version of Slime detects that kind of bug. Thanks for the idea.


Lukas Renggli

More information about the seaside mailing list