ovidiu 02/03/24 23:35:45 Modified: src/scratchpad/schecoon/src/org/apache/cocoon/components/flow/javascript JSCocoon.java Log: Save the Rhino scope. Don't make use of the responseSent anymore. Added method to allow the invalidation of the saved state. Removed jsFunction_lookupContinuation. Revision Changes Path 1.6 +18 -18 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.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- JSCocoon.java 24 Mar 2002 07:39:30 -0000 1.5 +++ JSCocoon.java 25 Mar 2002 07:35:45 -0000 1.6 @@ -28,11 +28,11 @@ public class JSCocoon extends ScriptableObject { protected AbstractInterpreter interp; + protected Scriptable scope; protected Environment environment; protected InvokeContext context; protected ComponentManager manager; protected ContinuationsManager continuationsMgr; - protected boolean responseSent = false; public JSCocoon() {} @@ -41,6 +41,16 @@ return "Cocoon"; } + public void setScope(Scriptable scope) + { + this.scope = scope; + } + + public Scriptable getScope() + { + return scope; + } + public void setInterpreter(AbstractInterpreter interp) { this.interp = interp; @@ -54,6 +64,13 @@ this.context = ctx; } + public void invalidateContext() + { + manager = null; + environment = null; + context = null; + } + public void setContinuationsManager(ContinuationsManager mgr) { this.continuationsMgr = mgr; @@ -130,13 +147,6 @@ Object cont) throws Exception { - if (responseSent) { - System.out.println("Response was already sent!"); - return; - } - else - responseSent = true; - if (pipelineArgs instanceof Wrapper) pipelineArgs = ((Wrapper)pipelineArgs).unwrap(); else if (pipelineArgs instanceof Scriptable) @@ -152,16 +162,6 @@ interp.processPipeline(name, (Map)pipelineArgs, bizData, kont.getWebContinuation(), environment, context); - } - - public Scriptable jsFunction_lookupContinuation(String id) - throws Exception - { - WebContinuation wk = continuationsMgr.lookupWebContinuation(id); - JSWebContinuation jswk = null; - if (wk != null) - jswk = (JSWebContinuation)wk.getUserObject(); - return jswk; } public void jsFunction_diplayAllContinuations()
---------------------------------------------------------------------- In case of troubles, e-mail: [EMAIL PROTECTED] To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]