You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Luca Marchetti <co...@marchetti.eu.org> on 2003/03/10 16:35:54 UTC

Flowscript

Hi all.
  I'm tryng to get flowscript work
 When I try to use flowscript, as in the flow/calc demo of cocoon2.1 i 
get this error:

ReferenceError: "Continuation" is not defined. 
(resource://org/apache/cocoon/components/flow/javascript/system.js; line 15)
        at 
org.mozilla.javascript.NativeGlobal.constructError(NativeGlobal.java:597)
        at 
org.mozilla.javascript.NativeGlobal.constructError(NativeGlobal.java:557)
        at 
org.mozilla.javascript.ScriptRuntime.name(ScriptRuntime.java:1076)
        at 
org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2265)
        at 
org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:58)
        at 
org.apache.cocoon.components.flow.javascript.JavaScriptInterpreter.callFunction(JavaScriptInterpreter.java:531)
        at 
org.apache.cocoon.components.treeprocessor.sitemap.CallFunctionNode.invoke(CallFunctionNode.java:197)
....
....
....

What is it?
Seems an internal error!
Anyone can help me?

My sitemap is:

 <map:components>
  <map:generators default="file"/>
  <map:transformers default="xslt"/>
  <map:readers default="resource"/>
  <map:serializers default="html"/>
  <map:matchers default="wildcard">
     <map:matcher logger="sitemap.matcher.header" name="filename" 
src="org.apache.cocoon.matching.modular.CachingRegexpMatcher">
        <input-module name="request-param">
           <parameter>filename</parameter>
        </input-module>
     </map:matcher>
  </map:matchers>
  <map:selectors default="browser"/>
 <map:flow-interpreters default="JavaScript"/>
 </map:components>


<!-- =========================== Pipelines 
================================= -->

<map:flow language="JavaScript">
    <map:script src="test.js"/>
</map:flow>
   
 <map:pipelines>
  <map:pipeline>
      <map:match pattern="test">
        <map:generate src="test.xml" />
        <map:serialize type="xml" />
    </map:match>

    <map:match pattern="kont/*">
            <map:call continuation="{1}"/>
    </map:match>

    <map:match pattern="script">
            <map:call function="test"/>
    </map:match>
  </map:pipeline>
 </map:pipelines>

and test.js is

function test()
{
    sendPage("test");
}

Thanks in advice,

Luca Marchetti


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


Re: Flowscript

Posted by Ugo Cei <u....@cbim.it>.
Luca Marchetti wrote:
> But... I need to declare some special component in the map:components 
> part of the sitemap?

No. I advise you to checkout the most recent CVS module and try with that.

	Ugo


-- 
Ugo Cei - Consorzio di Bioingegneria e Informatica Medica
P.le Volontari del Sangue, 2 - 27100 Pavia - Italy
Phone: +39.0382.525100 - E-mail: u.cei@cbim.it


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


Re: Flowscript

Posted by Luca Marchetti <co...@marchetti.eu.org>.
Ugo Cei wrote:

> Luca Marchetti wrote:
>
>>  I'm tryng to get flowscript work
>> When I try to use flowscript, as in the flow/calc demo of cocoon2.1 i 
>> get this error:
>>
>> ReferenceError: "Continuation" is not defined. 
>
>
> Looks like you have a wrong version of Rhino in your classpath. Verify 
> that you have rhino1.5r4-continuations-20020816.jar in WEB-INF/lib and 
> that it is not overridden by some other version.

Seems to be the right one for me....

But... I need to declare some special component in the map:components 
part of the sitemap?



---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


Re: Flowscript

Posted by Ugo Cei <u....@cbim.it>.
Luca Marchetti wrote:
>  I'm tryng to get flowscript work
> When I try to use flowscript, as in the flow/calc demo of cocoon2.1 i 
> get this error:
> 
> ReferenceError: "Continuation" is not defined. 

Looks like you have a wrong version of Rhino in your classpath. Verify 
that you have rhino1.5r4-continuations-20020816.jar in WEB-INF/lib and 
that it is not overridden by some other version.

	Ugo

-- 
Ugo Cei - Consorzio di Bioingegneria e Informatica Medica
P.le Volontari del Sangue, 2 - 27100 Pavia - Italy
Phone: +39.0382.525100 - E-mail: u.cei@cbim.it


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


Re: Flowscript

Posted by Niclas Hedhman <ni...@internuscorp.com>.
On Monday 10 March 2003 23:35, Luca Marchetti wrote:
> Hi all.
>   I'm tryng to get flowscript work
>  When I try to use flowscript, as in the flow/calc demo of cocoon2.1 i
> get this error:
>
> ReferenceError: "Continuation" is not defined.

Flow is still in progress, and there are issues with it, for instance 
documentation needs improvements and a debate of polishing it up has been 
started.
I suggest that you bring this up on Cocoon-dev instead. I think the developers 
like to have some more user involvement in Flow, as it will become a very 
integral part of Cocoon.

Niclas

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org