ovidiu      02/04/09 17:40:52

  Modified:    src/scratchpad/schecoon/src/org/apache/cocoon/components/flow/javascript
                        JSWebContinuation.java
  Log:
  Added support for passing the time-to-live argument when creating a
  WebContinuation from JavaScript.
  
  Revision  Changes    Path
  1.5       +12 -1     
xml-cocoon2/src/scratchpad/schecoon/src/org/apache/cocoon/components/flow/javascript/JSWebContinuation.java
  
  Index: JSWebContinuation.java
  ===================================================================
  RCS file: 
/home/cvs/xml-cocoon2/src/scratchpad/schecoon/src/org/apache/cocoon/components/flow/javascript/JSWebContinuation.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- JSWebContinuation.java    2 Apr 2002 05:36:29 -0000       1.4
  +++ JSWebContinuation.java    10 Apr 2002 00:40:52 -0000      1.5
  @@ -7,6 +7,7 @@
   import org.mozilla.javascript.Function;
   import org.mozilla.javascript.Scriptable;
   import org.mozilla.javascript.ScriptableObject;
  +import org.mozilla.javascript.Undefined;
   
   public class JSWebContinuation extends ScriptableObject
   {
  @@ -44,12 +45,22 @@
   
       ContinuationsManager contMgr = cocoon.getContinuationsManager();
       Object kont = args[1];
  +
       JSWebContinuation pjswk = (JSWebContinuation)args[2];
       WebContinuation pwk = (pjswk == null ? null : pjswk.wk);
   
  +    int ttl;
  +
  +    if (args[3] == Undefined.instance)
  +      ttl = 0;
  +    else {
  +      Number timeToLive = (Number)args[3];
  +      ttl = (timeToLive == null ? 0 : timeToLive.intValue());
  +    }
  +
       JSWebContinuation jswk = new JSWebContinuation();
       WebContinuation wk
  -      = contMgr.createWebContinuation(kont, pwk);
  +      = contMgr.createWebContinuation(kont, pwk, ttl);
       wk.setUserObject(jswk);
   
       jswk.cocoon = cocoon;
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     [EMAIL PROTECTED]
To unsubscribe, e-mail:          [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to