[Seaside] changing components without a complete redraw
cbeler at enit.fr
Thu Sep 21 09:20:23 UTC 2006
> I'm trying to figure out how to use Seaside and Scriptaculous to cause
> components on a page to be redrawn if they have changed from the last
> HTTP request. The scenario looks something like:
> html anchor
> onClick: (html updater
> callback: [ :render | self changeMe. self otherComponent
> changeYou. render /renderAllChangedElements/ ]);
> with: 'Do Change'.
> The existing implementation of SUUpdater does not collect the changed
> components and push all the changes back to the client at once. Has
> anyone done any work to collect all the changes and push them back to
> the browser (the /renderAllChangedElements/ call)? If not, I'll be
> happy to knock something together.
As far as I understand it, SUUpdater only allows to update a tag in the
page by redrawing it (and eventually it allows to trigger a form
element). It should be something like below. You need to know the id
that contain the part you want to update. If several components change,
you can have several updater with several onClick:.
callback: [:render |
self changeMe. your/ChangedComponent renderContentOn:
But maybe what you'd like to do is implementing a method
renderAllChangedElement in WACanvas ?
That seems complicated to me... you need to collect what are the
components that have their state changed and then redisplay them by
using updaters ?? Is it what you want ?
More information about the Seaside