changing components without a complete redraw

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

changing components without a complete redraw

David Pollak
Howdy,

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.

Thanks,

David

_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: changing components without a complete redraw

cbeler

> 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:.


html updater
            id: 'yourFirstChangedComponentId';
            callback: [:render |
                   self changeMe. your/ChangedComponent renderContentOn:
render/ ]);
...

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 ?

Cédrick


_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: changing components without a complete redraw

David Pollak
Cédrick,

On Sep 21, 2006, at 2:20 AM, Cédrick Béler wrote:

>
>> 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'.
>>
>>
>>
>
> ...
>
> 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 ?
>

This is what I want.  I guess I'll write the code.

Thanks,

David


_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside