[Seaside] scriptaculous - updater

Ramon Leon ramon.leon at allresnet.com
Thu Oct 12 17:31:01 UTC 2006


> Hi again
> 
> (1) I use an periodical that displays the time in the banner (always
> present) on my app and It seems to me the presence of this 
> periodical avoid expiration of session ? Am I right ?

Yes.

> (2) Also, I did a manipulation that cancel the updater. If I 
> use an updater to change a part that contain a periodical, 
> then the periodical effect is cancelled until a full refresh. 
> I don't 'understand why... if you have any ideas to avoid 
> loosing the effect or if I did something wrong ? I joined a 
> sample app that display time and an anchor that refresh it using Ajax.
> 
> snippet:
> renderContent2On: html
> 
>     html paragraph
>         script: (html periodical
>                 frequency: 2 second;
>                   on: #renderTimeOn: of: self);
>           with: [ self renderTimeOn: html ].
>        
>     html anchor
>         onClick: (html updater
>                     id: 'content';
>                     on: #renderContent2On: of: self);
>         with: 'live refresh'.
> 
> 
> Thanks
> 
> cédrick

Simple fix....

html anchor
    onClick: (html updater
                id: 'content';
                evalScripts: true;
                on: #renderContent2On: of: self);
    with: 'live refresh'.

By default, newly rendered JavaScript from an update, isn't evaluated.

Ramon Leon
http://onsmalltalk.com



More information about the Seaside mailing list