[Seaside] Never ending poll when rendering periodical

Leandro Pérez lperez at lifia.info.unlp.edu.ar
Mon Jul 2 16:27:34 UTC 2007



Lukas Renggli wrote:
> 
> 
> A periodical updater does never stop, unless you tell it to do so or a
> full page refresh happens.
> 
> http://www.prototypejs.org/api/ajax/periodicalUpdater
> 
That's the reason for which I set decay with a high value, so the periodical
updater stops when the response is the same.



Lukas Renggli wrote:
> 
>> The problem takes pleace where the text is in bold
> 
> Most people use plain text mail clients only.
> 
> 
Didn't noticed that, thanks and apologies


Lukas Renggli wrote:
> 
>> MyComponent>>renderContentOn:html
>>    html div id:'div' with:'some content'.
> 
> There seems to be a semicolon missing.
> 
>>    (html submitButton)
>>         onClick: (html evaluator callback: [:script |
>>                 [(Delay forSeconds:10)"Simulate long running process".
> 
> At least in Squeak you have to send #wait to the delay to actually start
> it.
> 
You are right! 
I wrote that code in my notepad, didn´t see those errors, the original code
doesn´t have them, :s sorry

>                   id: (self attributes at: #id);

You should use #ensureId instead.

>                   decay: 1000;

Lukas Renggli wrote:
> 
> 
I dont understand this quite well..

Lukas Renggli wrote:
> 
> I don't see why you use a decay, because the HTML always changes when
> you are rendering a link or form element. A decay of 1000 doesn't make
> much sense, that's far too big. Reasonable values are something
> between 1 and 2.
> 
I use a decay to stop polling when the server side processing is done: while
the process is being executed different hidden inputs are rendered, thus a
different response is sent, after the process is done, the hidden inputs are
no longer set and the response starts to be the same. With this mechanism
and a high decay value the poll is stopped. 
This was posted by Ramon Leon here:
http://www.nabble.com/Ajax-live-updates-tf1922480.html#a5263907
http://www.nabble.com/Displaying-progress-on-a-web-page-tf2115321.html#a5853986 

Lukas Renggli wrote:
> 
>>                   asynchronous: true;
> 
> This is not necessary, as it is the default.
> 
>>                   evalScripts: true;
> 
> You only need this one if you are on an old version of Scriptaculous.
> 
Didn't know that, thanks!!

I still don´t know why when rendering some stuff the poll stops and when
rendering other it goes on and on.. 

-- 
View this message in context: http://www.nabble.com/Never-ending-poll-when-rendering-periodical-tf4011797.html#a11397076
Sent from the Squeak - Seaside mailing list archive at Nabble.com.



More information about the Seaside mailing list