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

Philippe Marschall philippe.marschall at gmail.com
Sat Feb 9 10:04:14 UTC 2008


2008/2/9, Lukas Renggli <renggli at gmail.com>:
> >   > 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 ;-)

Write a book about it  ;-)

Cheers
Philippe

> > > 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
>
>
> --
> Lukas Renggli
> http://www.lukas-renggli.ch
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>


More information about the seaside mailing list