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

cdrick cdrick65 at gmail.com
Sat Feb 9 12:54:56 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 ;-)

Maybe the TabTestPanel could go in the examples as a start ?
Would you plan adding this feature ? Is it complementary to the
homeless callback ?
Maybe changing the callback method name would help to understand.,
maybe having a keyword (#callback:inComponent:).

Anyway, thanks for the explanation and discussion. This is always interesting :)

Cédrick


More information about the seaside mailing list