[Seaside-dev] Issue 121 in seaside: WATask does a redirect
codesite-noreply at google.com
codesite-noreply at google.com
Tue Oct 7 22:37:52 UTC 2008
Issue 121: WATask does a redirect
http://code.google.com/p/seaside/issues/detail?id=121
Comment #7 by jfitzell:
I traced this a bit further tonight.
So Lukas was trying to change WATask so that it runs #go from within
#nextPresentersDo:. The problem with this is that the first time
#nextPresentersDo:
is called for the task (at least in this case) is during #updateUrl: in a
WARedirectContinuation.
This means that the continuation is captured with that stack. His code also
catches
and ignores WARenderNotifications, which means that when we come back into
the
callback, do something else and then trigger a notification, the code
carries on as
if it were in the middle of #updateUrl: from the earlier render
continuation.
I tried monkeying around with WATask>>nextPresentersDo: and
WARedirectContinuation>>run to see if I could come up with a working
scenario but
it's pretty ugly and I can't quite get it to work so far. With the methods
implemented as follows, the functional test sort of works (but the session
and
continuation keys are in the form, not the URL, and we don't get a redirect
between
action phases).
nextPresentersDo: aBlock
self activeComponent == self ifTrue:
[ self answer: self go ].
super nextPresentersDo: aBlock
run
| url |
[url := self url.
self respond: [ :response | response redirectTo: url ] ]
on: WARenderNotification do: [ :n | self newRenderContinuation run]
But even if we figure out how to get this working it feels pretty
fragile... #call:
works because we know that any time it could be called (ie. during the last
callback
of an action phase), it is safe to totally abort what we are doing and start
something else. This just doesn't hold true in the general case of "any
time we call
#nextPresentersDo:", I think.
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
More information about the seaside-dev
mailing list