[Seaside] Never ending poll when rendering periodical

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

Hello everyone,
Using a periodical with a high decay value sometimes causes a never ending
poll mechanism. It seems that this depends on the type of brush being
rendered, I can't find what i'm doing wrong though.
I'm having this problem when trying to render anything with a javascript
event onXXX associated to it or simple form elements like basic checkboxes
with nothing else (like in the example).
The scenario is something like this...
Trying to render a kind of progress bar or anything alike while a long
running process is being executed server side, after the execution other
things must be rendered..

The problem takes pleace where the text is in bold

   html div id:'div' with:'some content'.
   (html submitButton)
        onClick: (html evaluator callback: [:script |
                [(Delay forSeconds:10)"Simulate long running process".
                self setWorkFinished] fork
		(script element)
		   id: 'div';
		   render:[:r | r div
                       with: [:h |  h submitButton ]
                       waitForCondition: [self isWorkFinished]
                       thenRender:  [:h |  h checkbox]]"The problem takes
place here!!!"
        text: 'Spin'.
WATagBrush >> with: initialRenderBlock waitForCondition: aBlock thenRender:
            script: ((canvas periodical)
                  id: (self attributes at: #id);
                  decay: 1000;
                  asynchronous: true;
                  evalScripts: true;
                  frequency: 1 seconds;
                        [:r |
                        aBlock value
                            ifFalse:[initialRenderBlock value: r.
                                     r hiddenInput text: r nextId    "This
is to keep decay low...generates different responses"]
                            ifTrue: [aRenderBlock value: r]]);
            with: initialRenderBlock 
When rendering simple things like this ones, everything works just fine and
the poll mechanism stops after the long running process has finished (as
	 <li>h text:'something..'
	 <li>h radiobutton
	 <li>h submitButton
But when trying to render anything more complex, after the long running
process has finished, the poll mechanism is still alive and posts are sent
to the server every 1 second (as stated in the frequency parameter of the
	 <li>h checkbox
	 <li>h submitButton onClick:(h evaluator)

I'm struggling with this for a while now and i can't solve it.. it's very
any ideas? 

help will be appreciated.
Thanks a lot,


i'm currently using
        VisualWorks NonCommercial, 7.5
        Seaside version 2.7b1.1
        Scriptaculous 2.6-mb.8

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

More information about the Seaside mailing list