ovidiu 02/03/21 15:26:03
Modified: src/scratchpad/schecoon/src/org/apache/cocoon/components/flow/javascript
system.js
Log:
Implement handleContinuation.
Revision Changes Path
1.2 +10 -8
xml-cocoon2/src/scratchpad/schecoon/src/org/apache/cocoon/components/flow/javascript/system.js
Index: system.js
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/scratchpad/schecoon/src/org/apache/cocoon/components/flow/javascript/system.js,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- system.js 19 Mar 2002 09:41:33 -0000 1.1
+++ system.js 21 Mar 2002 23:26:03 -0000 1.2
@@ -1,31 +1,33 @@
var suicide;
+var lastContinuation = null;
+
function callFunction(func, args)
{
- print ("callFunction enter callCC = " + callCC);
callCC(function(k) {
suicide = k;
- print("callFunction: suicide = " + suicide);
func.apply(this, args);
});
- print ("callFunction exit: suicide = " + suicide);
}
function sendPage(pipelineName, pipelineArgs, bizData)
{
- print ("pipelineName = " + pipelineName);
var kont;
callCC(function(k) {
- kont = k;
+ kont = new WebContinuation(cocoon, k, lastContinuation);
cocoon.processPipeline(pipelineName, pipelineArgs, bizData);
- print ("suicide now: suicide = " + suicide);
+// print ("created continuation with id " + kont.id);
suicide();
+ lastContinuation = k;
});
- print ("return from suicide");
return kont;
}
-function handleContinuation(kont)
+function handleContinuation(kontId)
{
+ var kont = cocoon.lookupContinuation(kontId);
+ cocoon.diplayAllContinuations();
+ if (kont != null)
+ kont.continuation();
}
----------------------------------------------------------------------
In case of troubles, e-mail: [EMAIL PROTECTED]
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]