You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Paul Joseph <pj...@yahoo.com> on 2004/12/13 13:54:24 UTC

calling xReporter from flowscript

Hi,

I have been trying to call the xReporter reports from
Flowscript, (so that later on, once I get it
going, I can inject a variable into the
pipeline.)

I added the following to my sitemap, to make the call
to the flowscript:
    <!-- contains the function Report -->
    <map:flow language="javascript">
      <map:script
      <map:script src="Report.js"/>
    </map:flow>

      <!-- the function Report that I want to use to
call xReporter itself -->
      <map:match pattern="Report">
          <map:call function="Report">
          </map:call>
      </map:match>

The function Report in Report.js is as follows:

    function Report() {
        var userBean =
cocoon.session.getAttribute('userBean');
        if (userBean != null) {
             cocoon.sendPage("en-US/datasources");
            return true; 
        }
        else {
           errorPage("Too bad!", "try again!");
           return false;
        }
}

I get this error:
org.apache.avalon.framework.CascadingRuntimeException:
"file:/C:/Tomcat
5.0/webapps/array/webtask/xreporter/Report.js", line
8: uncaught JavaScript exception: at Report
(file:/C:/Tomcat
5.0/webapps/array/webtask/xreporter/Report.js, Line
8): java.lang.IllegalStateException: Pipeline has
already been processed for this request

Any ideas? How should I be calling the xReporter
datasource from Flow?

thanks!
Paul




=====
This communication, including attachments, is for the exclusive use of 
the addressee and may contain proprietary, confidential, or privileged
information.  If you are not the intended recipient, any use, copying,
disclosure, dissemination, or distribution is strictly prohibited.  If 
you are not the intended recipient, please notify the sender by return mail and delete this communication and destroy all copies.

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