[Seaside] Plotkit and Ajax
ssastre at seaswork.com
Tue Nov 4 18:21:23 UTC 2008
This is kind of expected to happen with all updateable components who define
behavior when page loads. If you for instance observe 'dom:loaded' and use that
to initialize the dom element somehow, you have to take care about updating it.
Every updater on one of those will create new instances (at dom) of the elements
so they could need to be initialized onComplete.
I actually dont use onComplete for that because it happens too early. Instead I
set an #updated var to true for that element in the onComplete so it can be
That way, after rendering the element, the updater will execute the script (that
I've also set to be rendered in the updater callback) of that element and
(re)install behavior and (re)initialize that component. There you can do
whatever you need to hook events, set reactions, etc.
PD: with periodical is the same but periodically repetitive. But, its a pity
that Prototype's periodical hijacks onComplete for implementation and will
completely ignore your custom onComplete. This week I needed that and I had no
choice but to make my own periodical updater version which includes the
onComplete feature as anyone will expect.
> -----Mensaje original-----
> De: seaside-bounces at lists.squeakfoundation.org
> [mailto:seaside-bounces at lists.squeakfoundation.org] En nombre
> de Karsten
> Enviado el: Martes, 04 de Noviembre de 2008 15:14
> Para: seaside-list
> Asunto: [Seaside] Plotkit and Ajax
> if I try to update a PlotKit element via Ajax-Updater the
> browser seems
> to forget the functions that are defined in the response-html. The
> result is that an error happens when these functions are called then.
> Does anyone know why this happens and how one could work around this
> Kind Regards
> Karsten Kusche - Dipl.Inf. - karsten at heeg.de
> Tel: +49 3496 21 43 29
> Georg Heeg eK - Köthen
> Handelsregister: Amtsgericht Dortmund A 12812
> seaside mailing list
> seaside at lists.squeakfoundation.org
More information about the seaside