[Seaside] Re: Automating ajax component updates

Lukas Renggli renggli at gmail.com
Tue Jan 1 21:10:36 UTC 2008


> I am using the version from your repository. Where would you recommend I
> accumulate the changed components until they get re-rendered?

You need some place to put the announcer. Depending on your
application either a custom session class or the root component might
be appropriate.

> >>  html evaluator callback: [ :s |
> >>    batchedItems do: [ :changedComponent |
> >>      s element id: changedComponent id; update: ??? ]]
> >>
> >> What should the "???" look like? I don't think I have a canvas to render
> >> on
> >> at this point.
> >
> > ??? can be anything renderable: a string, a component, a block, ...
>
> Wonderful, thank you.
>
> Does the approach above seem reasonable?

Yes, I've done this many times. Whenever an event happens you
initialize an announcement with the script of the evaluator. Anybody
interested is subscribed to this event and can add code to the script
to update itself.

Cheers,
Lukas

-- 
Lukas Renggli
http://www.lukas-renggli.ch


More information about the seaside mailing list