cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ovi...@apache.org
Subject cvs commit: xml-cocoon2/src/scratchpad/schecoon/src/org/apache/cocoon/components/flow/javascript JSCocoon.java
Date Wed, 10 Apr 2002 00:39:51 GMT
ovidiu      02/04/09 17:39:51

  Modified:    src/scratchpad/schecoon/src/org/apache/cocoon/components/flow/javascript
                        JSCocoon.java
  Log:
  Remove processPipeline() function. Allow parameters to be set from
  Java and retrieved from the JavaScript side.
  
  Revision  Changes    Path
  1.9       +12 -22    xml-cocoon2/src/scratchpad/schecoon/src/org/apache/cocoon/components/flow/javascript/JSCocoon.java
  
  Index: JSCocoon.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/scratchpad/schecoon/src/org/apache/cocoon/components/flow/javascript/JSCocoon.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- JSCocoon.java	2 Apr 2002 05:35:16 -0000	1.8
  +++ JSCocoon.java	10 Apr 2002 00:39:51 -0000	1.9
  @@ -12,6 +12,7 @@
   import org.apache.cocoon.environment.ObjectModelHelper;
   import org.apache.cocoon.environment.Request;
   import org.apache.cocoon.environment.Response;
  +import org.mozilla.javascript.NativeArray;
   import org.mozilla.javascript.ScriptRuntime;
   import org.mozilla.javascript.Scriptable;
   import org.mozilla.javascript.ScriptableObject;
  @@ -28,6 +29,7 @@
   {
     protected AbstractInterpreter interp;
     protected Scriptable scope;
  +  protected NativeArray parameters;
     protected Environment environment;
     protected InvokeContext context;
     protected ComponentManager manager;
  @@ -50,6 +52,11 @@
       return scope;
     }
   
  +  public void setParameters(NativeArray parameters)
  +  {
  +    this.parameters = parameters;
  +  }
  +
     public void setInterpreter(AbstractInterpreter interp)
     {
       this.interp = interp;
  @@ -80,6 +87,11 @@
       return continuationsMgr;
     }
   
  +  public NativeArray jsGet_parameters()
  +  {
  +    return parameters;
  +  }
  +
     public AbstractInterpreter jsGet_interpreter()
     {
       return interp;
  @@ -139,28 +151,6 @@
     public String jsFunction_toString()
     {
       return "[object " + toString() + "]";
  -  }
  -
  -  public void jsFunction_processPipeline(String name, Object pipelineArgs,
  -                                         Object bizData,
  -                                         Object cont)
  -    throws Exception
  -  {
  -    if (pipelineArgs instanceof Wrapper)
  -      pipelineArgs = ((Wrapper)pipelineArgs).unwrap();
  -    else if (pipelineArgs instanceof Scriptable)
  -      pipelineArgs = jsobjectToMap((Scriptable)pipelineArgs);
  -
  -    if (bizData instanceof Wrapper)
  -      bizData = ((Wrapper)bizData).unwrap();
  -    else if (bizData instanceof Scriptable)
  -      bizData = jsobjectToMap((Scriptable)bizData);
  -
  -    JSWebContinuation kont = (JSWebContinuation)cont;
  -
  -    interp.processPipeline(name, (Map)pipelineArgs, bizData,
  -                           kont.getWebContinuation(),
  -                           environment, context);
     }
   
     public void jsFunction_forwardTo(String uri, Object bizData, Object cont)
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org


Mime
View raw message