cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leszek Gawron <o...@wlkp.org>
Subject Re: Call continuations from flow instead of sitemap
Date Fri, 02 Apr 2004 08:43:32 GMT
On Thu, Apr 01, 2004 at 02:39:05PM -0500, Vadim Gritsenko wrote:
> Leszek Gawron wrote:
> 
> >I have this snipped in one of my .js files :
> > 
> >
> ...
> 
> >function runContinuation( action ) {
> > 
> >
> 
> Provided that "action" contains continuation ID and not actual 
> continuation object... you need to lookupWebContinuation from the 
> ContinuationsManager component, this will give you WebContinuation 
> object. Once you have it... Something like this should be able to invoke it:
> 
>    var wk = contManager.lookupWebContinuation(action);
>    var c = wk.getContinuation();
>    c(c);
Vadim,
This does not work. I get this exception:

rg.apache.avalon.framework.CascadingRuntimeException: "resource://org/apache/cocoon/forms/flow/javascript/Form.js",
line 106: uncaught JavaScript exception: at main (file:/C:/dev/eclipse-workspace/nTer/build/webapp/nTer/flow/test.js,
Line 12) at (resource://org/apache/cocoon/forms/flow/javascript/Form.js, Line 106): java.lang.NullPointerException

org.apache.avalon.framework.CascadingRuntimeException: "resource://org/apache/cocoon/forms/flow/javascript/Form.js",
line 106: uncaught JavaScript exception: 
at main (file:/C:/dev/eclipse-workspace/nTer/build/webapp/nTer/flow/test.js, Line 12)
at  (resource://org/apache/cocoon/forms/flow/javascript/Form.js, Line 106):
java.lang.NullPointerException
	at org.apache.cocoon.components.flow.javascript.fom.FOM_JavaScriptInterpreter.callFunction(FOM_JavaScriptInterpreter.java:695)
	at org.apache.cocoon.components.treeprocessor.sitemap.CallFunctionNode.invoke(CallFunctionNode.java:130)
	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:49)
	at org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:130)
	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:72)
	at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:126)
	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:72)
	at org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:101)
	at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:336)
	at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:277)
	at org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNode.java:103)
	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:49)
	at org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:130)
	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:72)
	at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:126)
	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:72)
	at org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:101)
	at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:336)
	at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:277)
	at org.apache.cocoon.Cocoon.process(Cocoon.java:619)
	at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1074)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:356)
	at org.mortbay.jetty.servlet.WebApplicationHandler$Chain.doFilter(WebApplicationHandler.java:342)
	at com.mobilebox.hibernate.PersistenceManager.doFilter(PersistenceManager.java:65)
	at org.mortbay.jetty.servlet.WebApplicationHandler$Chain.doFilter(WebApplicationHandler.java:334)
	at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:286)
	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:567)
	at org.mortbay.http.HttpContext.handle(HttpContext.java:1808)
	at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:525)
	at org.mortbay.http.HttpContext.handle(HttpContext.java:1758)
	at org.mortbay.http.HttpServer.service(HttpServer.java:879)
	at org.mortbay.http.HttpConnection.service(HttpConnection.java:790)
	at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:952)
	at org.mortbay.http.HttpConnection.handle(HttpConnection.java:807)
	at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:197)
	at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:289)
	at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:496)
Caused by: java.lang.NullPointerException
	at org.apache.cocoon.components.flow.javascript.fom.FOM_Cocoon.jsGet_request(FOM_Cocoon.java:1350)
	at org.apache.cocoon.components.flow.javascript.fom.FOM_Cocoon.getRequest(FOM_Cocoon.java:1404)
	at org.apache.cocoon.forms.flow.javascript.FormsFlowHelper.getFormContext(FormsFlowHelper.java:37)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:324)
	at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:230)
	at org.mozilla.javascript.ScriptRuntime.call(ScriptRuntime.java:1244)
	at org.mozilla.javascript.continuations.ContinuationInterpreter.interpret(ContinuationInterpreter.java:1134)
	at org.mozilla.javascript.continuations.ContinuationInterpreter.interpret(ContinuationInterpreter.java:190)
	at org.mozilla.javascript.continuations.ContinuationInterpreter.interpret(ContinuationInterpreter.java:138)
	at org.mozilla.javascript.continuations.InterpretedFunctionImpl.call(InterpretedFunctionImpl.java:121)
	at org.mozilla.javascript.ScriptRuntime.call(ScriptRuntime.java:1244)
	at org.apache.cocoon.components.flow.javascript.fom.FOM_JavaScriptInterpreter.callFunction(FOM_JavaScriptInterpreter.java:686)
	... 37 more

I have attached the source of test.js

When I disable the call to loginInternal, main application view is being
shown. But after I press an action button there is an error with page local
variable. So it looks like invoking continuation this way does not set the run
environment properly

	lg
-- 
            __
         | /  \ |        Leszek Gawron            //  \\
        \_\\  //_/       ouzo@wlkp.org           _\\()//_
         .'/()\'.     Phone: +48(501)720812     / //  \\ \
          \\  //  recursive: adj; see recursive  | \__/ |


Mime
View raw message