getting closer!
No pipeline matched request: registration2.mika

14.3.2012 21:35, Robby Pelssers kirjoitti:

Try

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

Cheers,

Robby

*From:*Mika M Lehtonen [mailto:m...@digikartta.net]
*Sent:* Wednesday, March 14, 2012 8:33 PM
*To:* users@cocoon.apache.org
*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"/>
<map:serialize/>
</map:match>

- 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.
Robby -----Original Message-----
From: Mika M Lehtonen [mailto:m...@digikartta.net]
Sent: Wednesday, March 14, 2012 6:32 PM
To:users@cocoon.apache.org  <mailto:users@cocoon.apache.org>
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"/>
<map:serialize/>
</map:match>
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
name.
java.io.FileNotFoundException:
/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.
cheers,
- mika -
---------------------------------------------------------------------
To unsubscribe, e-mail:users-unsubscr...@cocoon.apache.org  
<mailto:users-unsubscr...@cocoon.apache.org>
For additional commands, e-mail:users-h...@cocoon.apache.org  
<mailto:users-h...@cocoon.apache.org>
---------------------------------------------------------------------
To unsubscribe, e-mail:users-unsubscr...@cocoon.apache.org  
<mailto:users-unsubscr...@cocoon.apache.org>
For additional commands, e-mail:users-h...@cocoon.apache.org  
<mailto:users-h...@cocoon.apache.org>

Reply via email to