RE: Sitemap: Error calling continuation

Robby Pelssers <[email protected]>
Newsgroups gmane.text.xml.cocoon.user
Message-ID <A5838A1302A3AC48B4A90FAD790B51AB09F82320@AMXPRD0410MB366.eurprd04.prod.outlook.com>
I think you’re not using Cocoon2.2 so there might be some differences of course…

And so far I have a hunch which you should try out.

    var viewData = { "title" : form.getChild("title").getValue() }

should probably become

    var viewData = { "title" : form.form.getChild("title").getValue() }


Can you give that a try first?

Oh yes..

And for debugging purposes you can also wrap it in a try catch block:

function editingForm() {
   try {
     //do your stuff here
   } catch (e) {
       cocoon.sendPage(“someErrorTemplate”, {“exception”: e})
   }
}

From: Dimitra Nefeli [mailto:[email protected]]
Sent: Friday, January 11, 2013 1:42 PM
To: [email protected]
Subject: Re: Sitemap: Error calling continuation

On 01/11/2013 02:06 PM, Robby Pelssers wrote:

Can you perhaps show the flowscript involved and the relevant sitemap snippets?



Robby



-----Original Message-----

From: Dimitra Nefeli [mailto:[email protected]]

Sent: Friday, January 11, 2013 11:43 AM

To: [email protected]<mailto:[email protected]>

Subject: Sitemap: Error calling continuation



Hi,

I am trying to make a form and submitting it, a new xml file will be created.

The problem is with the sitemaps and the pipelines.

In the sitemap.xmap of my folder (dcEditor), I have defined a "dc-success-pipeline", which simply "calls" a .jx file.

The problem is in the continuation of sitemaps, appearing the error:

org.apache.cocoon.ProcessingExcetion: Sitemap: error calling continuation at <map:call> - file:///usr/local/fedora/tomcat/webapps/cocoon/dcEditor/sitemap.xmap<file:///\\usr\local\fedora\tomcat\webapps\cocoon\dcEditor\sitemap.xmap>

at <map:call> - file:///usr/local/fedora/tomcat/webapps/cocoon/sitemap.xmap<file:///\\usr\local\fedora\tomcat\webapps\cocoon\sitemap.xmap>



I don't know if this information is adequate.

Please if anyone has some idea, let's help.



Thanks in advance,

Dimitra.



---------------------------------------------------------------------

To unsubscribe, e-mail: [email protected]<mailto:[email protected]>

For additional commands, e-mail: [email protected]<mailto:[email protected]>









---------------------------------------------------------------------

To unsubscribe, e-mail: [email protected]<mailto:[email protected]>

For additional commands, e-mail: [email protected]<mailto:[email protected]>


The sitemap.xmap is:
<?xml version="1.0"?>
<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0"<http://apache.org/cocoon/sitemap/1.0>>

  <map:components>
    <map:transformers default="xslt">
      <map:transformer name="i18n"
        src="org.apache.cocoon.transformation.I18nTransformer">
        <catalogues default="forms">
          <catalogue id="forms" name="messages"
            location="resource://org/apache/cocoon/forms/system/i18n"<resource://org/apache/cocoon/forms/system/i18n>/>
        </catalogues>
        <cache-at-startup>true</cache-at-startup>
      </map:transformer>
    </map:transformers>
  </map:components>


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

   <map:pipelines>
   <map:pipeline>
     <map:match pattern="editing">
       <map:call function="editingForm"/>
     </map:match>

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

     <map:match pattern="dc-display-pipeline">
       <map:generate type="jx" src="dc_template.xml"/>
       <map:transform type="i18n">
         <map:parameter name="locale" value="en-US"/>
       </map:transform>
       <map:transform src="forms-samples-styling.xsl"/>
       <map:serialize/>
     </map:match>

     <map:match pattern="dc-success-pipeline">
       <map:generate type="jx" src="dc_success.jx">
     </map:match>

     <map:match pattern="resources/*/**">
       <map:read src="resource://org/apache/cocoon/{1}/resources/{2}"<resource://org/apache/cocoon/%7b1%7d/resources/%7b2%7d>/>
     </map:match>

   </map:pipeline>

 </map:pipelines>

</map:sitemap>

editing.js
cocoon.load("resource://org/apache/cocoon/forms/flow/javascript/Form.js"<resource://org/apache/cocoon/forms/flow/javascript/Form.js>);

function editingForm() {
        var form = new Form("dc_definition.xml");

        form.showForm("dc-display-pipeline");

    var viewData = { "title" : form.getChild("title").getValue() }
        cocoon.sendPage("dc-success-pipeline", viewData);
}

and dc_success.jx
<?xml version="1.0"?>
<html>
  <head>
    <title>Editing successful</title>
  </head>
  <body>
    pipeline works for ${title}!
  </body>
</html>.

Thanks in advance,
Dimitra
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.