cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Friedman <>
Subject Re: Help, Java Flow drives me crazy
Date Wed, 30 Mar 2005 14:04:54 GMT
gkrishna -

I believe (but I may be wrong here) that the only supported language for 
flow is javascript.


so to get your calculator method to be called

1) change the sitemap flow declaration

 <map:flow language="java">
  <map:script src="CalculatorFlow"/>

 <map:flow language="javascript">
  <map:script src="calculator.js"/>

2) create a file called calculator.js and declare a function

function doCalculator() {
    var calculator = new CalculatorFlow().doCalculator();

    ... do something with the calculator ...

3) call the function from your sitemap

<map:call function="doCalculator"/>

In effect, use the flow to call a javascript function that in turn calls 
the Java method.


- paul

p.s. Generally the calls to sendPage and sendPageAndWait are called from 
the javascript function and not from the java class. You might want to 
start anew and follow the tutorial here: to see where the 
particular flow calls are made.

gkrishna wrote:

>Hello everybody,
>Using cocoon 2.1.6..
>i have attached a simple calculator java flow application. i am calling a function doCalculator
from CalculatorFlow in the sitemap.
>When i deploy the application in tomcat i always get,
>No method 'doCalculator' found. {calculator=public void CalculatorFlow.doCalculator()}
>though the method is mentioned in
>Can someone point me in correct direction here, please. It really drives me crazy.
>Hoping for your reply.

No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.8.4 - Release Date: 3/27/2005

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message