[Seaside] Showing progress
Jupiter Jones
jupiter.jones at mail.com
Fri Mar 3 02:54:16 UTC 2017
Hi all,
I have a relatively short process (about 5 to 10 seconds) that I would like to show the progress of.
It’s triggered by ajax:
html button
bePush;
onClick:
(html jQuery ajax script: [ :s | self fetchShowingProgressOnScript: s ]);
fetchShowingProgressOnScript: s
s << (s jQuery id: ‘progress')
html: [ :r | r paragraph: 'Connecting to Downer...' ].
integration connect.
s << (s jQuery id: ‘progress')
html: [ :r | r paragraph: 'Logging In...' ].
integration login.
s << (s jQuery id: ‘progress')
html: [ :r | r paragraph: 'Looking up ' , self idToFetch ].
integration find: self idToFetch..
s << (s jQuery id: ‘progress') html: [ :r | r paragraph: 'Done.' ].
integration quit
However this won’t work because the script will not be returned to the browser until the method completes.
What’s the recommended way of going about this? Can you push a partial result without a streaming server?
Is there a way of doing this without some kind of polling loop and running the long operation in a separate thread?
Cheers,
Jupiter
More information about the seaside
mailing list