var page = cocoon.createPage();
page.begin(); <-- Continuation created here to "bookmark" page
// acquire resources needed to generate page var biz = ...
page.send(uri, biz); <-- WebContinuation created here
// release resources needed for pipeline processing biz = null;
page.commit(); <-- Continuation created here to handle submit of page and script is suspended
Both JS continuations would be associated with the WebContinuation created by
page.send(), i.e:
public class WebContinuation {
public WebContinuation getParent();
public Object getBookmarkContinuation(); public Object getSubmitContinuation();
public void setBookmarkContinuation(Object continuation); public void setSubmitContinuation(Object continuation);
... }
The id passed to <map:call> would include an indicator of whether handleContinuation() should select the bookmark or the submit continuation.
WDYT?
Chris
Vadim Gritsenko wrote:
Vadim Gritsenko wrote:
<snippp/>
I'm in favor of (b) as it is more consistent. So, my proposal is:
(a) Modify makeWebContinuation to behave same as sendPageAndWait w.r.t. lastContinuation
(b) Expose makeWebContinuation in the Javascript.
(c) Using makeWebContinuation, system.js can be extended to include bookmark() Javascript function.
WDYT?
Guys, comments?
PS in case js attachment got blocked, original email is here: http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=107479669416699
Vadim
