cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robby Pelssers <>
Subject RE: pipeline in flowscript
Date Wed, 14 Mar 2012 20:14:52 GMT

Then I give you some advice. First try to invoke that pipeline with pattern="registration.mika".


If that fails... you know why ;-)

At least...   I hope so.  You generate 'forms/registration2.xml'. This means you have some
cocoon block and within that block a subfolder 'forms' containing a file 'registration2.xml'.
 For c2.2  that 'forms' folder would be located in COB-INF.

Hope you can tackle it from here?!


From: Mika M Lehtonen []
Sent: Wednesday, March 14, 2012 9:12 PM
Subject: Re: pipeline in flowscript

you're right, but
org.apache.cocoon.ResourceNotFoundException: No pipeline matched request: registration.mika

What I meant that know the exception is 'resource not found' instead 'file not found'

14.3.2012 21:52, Robby Pelssers kirjoitti:
No... we're not getting closer. We should have been there if you paid attention ;-)

Using the cocoon:// protocol you should have blindly copied over my suggestion.  It's not
registration2.mika but registration.mika as in your own sample sitemap snippet.

<map:match pattern="registration.mika">
  <map:generate src="forms/registration2.xml"/>

From: Mika M Lehtonen []
Sent: Wednesday, March 14, 2012 8:41 PM
Subject: Re: pipeline in flowscript

getting closer!
No pipeline matched request: registration2.mika

14.3.2012 21:35, Robby Pelssers kirjoitti:

    var form = new Form("cocoon://registration.mika");


From: Mika M Lehtonen []
Sent: Wednesday, March 14, 2012 8:33 PM
Subject: Re: pipeline in flowscript

Hi Robby,
"..create form definitions on the fly.."
That is my ultimate goal.

"Any reason why you don't switch to C2.2 or C3?"
Any reason why not continue using C2.1?
This is something I newer understood. Why did the C2.1 were almost abandoned. As far as I
know, it is like 99% ready piece of software with little childhood diseases. I understand
how much clever these new versions can be, especially in front of the expert eyes. But how
much is left from the original idea? And anyway, the learning curve or the opportunity costs
are little too high to switch into entirely different framework, albeit it would have the
same name. And C3 is all the way too alfa for  production usage.

But if I find Cocoon to be the right framework for our needs, I will do the switching at some
stage. But how long does it take before C3 is in stable state..

Back to my question, what am I doing wrong?
var form = new Form("registration.mika");  doesn't work
var form = new Form("forms/registration2.xml"); does work


<map:match pattern="registration.mika">
<map:generate src="forms/registration2.xml"/>

- mika -

14.3.2012 20:39, Robby Pelssers kirjoitti:

Hi Mika,

I can reassure you that this is possible. Most use cases have a static form definition and
you can bind data from your database to the widgets declared in this form definition.  Hack,
you can even use repeaters to get some dynamic behavior or even create form definitions on
the fly but those are more exotic use cases.

Just one question though.  You only recently started to experiment with C2.11.  Any reason
why you don't switch to C2.2 or C3?

Back to your question:

>From flowscript you can access your Java components responsible for retrieving data from
the database. Next you can use the Cocoon forms api to dynamically populate your widgets with
values. This also works vice versa where on a form submit you intercept the widget values
and save them back.


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

From: Mika M Lehtonen []

Sent: Wednesday, March 14, 2012 6:32 PM


Subject: pipeline in flowscript

Hi list,

I started to experiment with the Cocoon 2.11 after a long while. I did

some adjustment on the registration example.

I added this to the samples/blocks/forms/ sitemap:

<map:match pattern="registration.mika">

<map:generate src="forms/registration2.xml"/>



and this modification to the registration.js

var form = new Form("registration.mika");

This is not working. Obviously this is trying to fetch a file with that


/home/tomcat/webapps/cocoon/samples/blocks/forms/registration.mika (No

such file or directory)

How can I make this work with the pipelines?

I am trying to create forms based on data in database, anyway that is

the ultimate goal. I found some examples how to use pipelines in flow

script, but I haven't been able to get them work.


- mika -


To unsubscribe, e-mail:<>

For additional commands, e-mail:<>


To unsubscribe, e-mail:<>

For additional commands, e-mail:<>

View raw message