[Seaside] Ajax live updates
ramonleon at cox.net
Thu Jul 13 03:06:01 UTC 2006
> Or create a custom subclass of WASession and override the method
> #incomingRequest: with something like:
> incomingRequest: aRequest
> ^ aRequest isXMLHttpRequest
> ifTrue: [ self responseForRequest: aRequest ]
> ifFalse: [ super incomingRequest: aRequest ]
OK, I've had no luck with this approach, seems to be too many
assumptions about session having a current request, then updater not
being able to find its current session. Messing with the guts of
Seaside is just beyond me right now, to many things I don't yet grok
about the continuations and callbacks and how it all fits together.
>> Now I understand your problem, thanks for the example. The simplest and
>> safest workaround (without messing with the internals of Seaside) is
>> probably to do the AJAX request within a different session.
OK, since I've gotten nowhere on the first approach, is there an easy
way to do this? I'd like to be able to just do something like this...
html div id: #price; with: 'searching...'
(html updater id: aName; asyncCallback: [:r |
(Delay forSeconds: 10) wait. "fake long running process"
r div id: #price; with: DateAndTime now])
and have asyncCallback somehow get a url that comes back on a new
session to prevent blocking, and immediately expire that session after
rendering so it doesn't hand around for 20 minutes. Anyone? Anyone?
More information about the Seaside