Re: pipeline in flowscript

2012-03-14 Thread Andre Juffer

On 03/14/2012 07:31 PM, Mika M Lehtonen wrote:

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:


Did you to say here that this particular sitemap is a subdirectory 
called forms...



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


if yes, then this probably would try to load a file in 
forms/registration2.xml, that is subdirectory of forms, thus 
forms/forms/registration2.xml in the block context.




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.


An alternative is to send the form data back to the client, and let the 
client create the form, instead of creating the form plus form data by 
the server. See for instance the dojotoolkit (do not use the one 
included in cocoon, nor required at all).






cheers,
- mika -


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




--
Andre H. Juffer  | Phone: +358-8-553 1161
Biocenter Oulu and   | Fax: +358-8-553-1141
Department of Biochemistry   | Email: andre.juf...@oulu.fi
University of Oulu, Finland  | WWW: www.biochem.oulu.fi/Biocomputing/
StruBioCat   | WWW: www.strubiocat.oulu.fi
Triacle Biocomputing | WWW: www.triacle-bc.com

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



Re: pipeline in flowscript

2012-03-14 Thread Mika M Lehtonen

14.3.2012 20:00, Andre Juffer kirjoitti:

On 03/14/2012 07:31 PM, Mika M Lehtonen wrote:

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:


Did you to say here that this particular sitemap is a subdirectory 
called forms...

that is ...cocoon/samples/blocks/forms/sitemap.xmap



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


if yes, then this probably would try to load a file in 
forms/registration2.xml, that is subdirectory of forms, thus 
forms/forms/registration2.xml in the block context.
This one works 
http://host:8080/cocoon/samples/blocks/forms/registration.mika
The actual file is here: 
/home/tomcat/webapps/cocoon/samples/blocks/forms/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.


An alternative is to send the form data back to the client, and let 
the client create the form, instead of creating the form plus form 
data by the server. See for instance the dojotoolkit (do not use the 
one included in cocoon, nor required at all).
Original question still remains; how can I use data from pipelines in 
flowscript instead of static files, or can I?


- mika -






cheers,
- mika -


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








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



RE: pipeline in flowscript

2012-03-14 Thread Robby Pelssers
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
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
For additional commands, e-mail: users-h...@cocoon.apache.org


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



Re: pipeline in flowscript

2012-03-14 Thread Andre Juffer

On 03/14/2012 08:24 PM, Mika M Lehtonen wrote:

14.3.2012 20:00, Andre Juffer kirjoitti:

On 03/14/2012 07:31 PM, Mika M Lehtonen wrote:

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:


Did you to say here that this particular sitemap is a subdirectory
called forms...

that is ...cocoon/samples/blocks/forms/sitemap.xmap



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


if yes, then this probably would try to load a file in
forms/registration2.xml, that is subdirectory of forms, thus
forms/forms/registration2.xml in the block context.

This one works
http://host:8080/cocoon/samples/blocks/forms/registration.mika
The actual file is here:
/home/tomcat/webapps/cocoon/samples/blocks/forms/forms/registration2.xml


Thus, your sitemap is at the top directory (block context) and not in 
forms/forms directory. You registration2.xml should then be in 
forms/registration2.xml and not in forms/forms/registration2.xml.



You did read this all, right?

http://cocoon.apache.org/2.1/userdocs/binding.html

Forms can be pre-filled using something like

?xml version=1.0 encoding=UTF-8?
fb:context
xmlns:fb=http://apache.org/cocoon/forms/1.0#binding;
path=/ 

  fb:value id=surname path=surname /
  fb:value id=initials path=initials /
  fb:value id=firstname path=firstname /
  fb:value id=email path=email /

/fb:context

Still, I would argue not to use this, and move this all to the client 
and use a toolkit like dojo instead. This is much more efficient.






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.


An alternative is to send the form data back to the client, and let
the client create the form, instead of creating the form plus form
data by the server. See for instance the dojotoolkit (do not use the
one included in cocoon, nor required at all).

Original question still remains; how can I use data from pipelines in
flowscript instead of static files, or can I?

- mika -






cheers,
- mika -


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








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




--
Andre H. Juffer  | Phone: +358-8-553 1161
Biocenter Oulu and   | Fax: +358-8-553-1141
Department of Biochemistry   | Email: andre.juf...@oulu.fi
University of Oulu, Finland  | WWW: www.biochem.oulu.fi/Biocomputing/
StruBioCat   | WWW: www.strubiocat.oulu.fi
Triacle Biocomputing | WWW: www.triacle-bc.com

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



Re: pipeline in flowscript

2012-03-14 Thread Mika M Lehtonen

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
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
For additional commands, e-mail: users-h...@cocoon.apache.org


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





Re: pipeline in flowscript

2012-03-14 Thread Mika M Lehtonen

14.3.2012 20:39, Andre Juffer kirjoitti:

On 03/14/2012 08:24 PM, Mika M Lehtonen wrote:

14.3.2012 20:00, Andre Juffer kirjoitti:

On 03/14/2012 07:31 PM, Mika M Lehtonen wrote:

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:


Did you to say here that this particular sitemap is a subdirectory
called forms...

that is ...cocoon/samples/blocks/forms/sitemap.xmap



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


if yes, then this probably would try to load a file in
forms/registration2.xml, that is subdirectory of forms, thus
forms/forms/registration2.xml in the block context.

This one works
http://host:8080/cocoon/samples/blocks/forms/registration.mika
The actual file is here:
/home/tomcat/webapps/cocoon/samples/blocks/forms/forms/registration2.xml


Thus, your sitemap is at the top directory (block context) and not in 
forms/forms directory. You registration2.xml should then be in 
forms/registration2.xml and not in forms/forms/registration2.xml.

How about this? map:generate src=forms/registration2.xml/
site map is in the first forms directory and this is using source which 
is in the second..?



You did read this all, right?

http://cocoon.apache.org/2.1/userdocs/binding.html

Forms can be pre-filled using something like

?xml version=1.0 encoding=UTF-8?
fb:context
xmlns:fb=http://apache.org/cocoon/forms/1.0#binding;
path=/ 

fb:value id=surname path=surname /
fb:value id=initials path=initials /
fb:value id=firstname path=firstname /
fb:value id=email path=email /

/fb:context

Still, I would argue not to use this, and move this all to the client 
and use a toolkit like dojo instead. This is much more efficient.






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.


An alternative is to send the form data back to the client, and let
the client create the form, instead of creating the form plus form
data by the server. See for instance the dojotoolkit (do not use the
one included in cocoon, nor required at all).

Original question still remains; how can I use data from pipelines in
flowscript instead of static files, or can I?

- mika -






cheers,
- mika -


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








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








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



RE: pipeline in flowscript

2012-03-14 Thread Robby Pelssers
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.orgmailto: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.orgmailto:users-unsubscr...@cocoon.apache.org

For additional commands, e-mail: 
users-h...@cocoon.apache.orgmailto:users-h...@cocoon.apache.org





-

To unsubscribe, e-mail: 
users-unsubscr...@cocoon.apache.orgmailto:users-unsubscr...@cocoon.apache.org

For additional commands, e-mail: 
users-h...@cocoon.apache.orgmailto:users-h...@cocoon.apache.org





Re: pipeline in flowscript

2012-03-14 Thread Mika M Lehtonen

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
  





Re: pipeline in flowscript

2012-03-14 Thread Andre Juffer

From a old application, written many years ago:

In Flow:

var form = new Form(resource/internal/forms/feedback-definition.xml);
form.createBinding(resource/internal/forms/feedback-binding.xml);
var feedback = new Feedback();  // Holds data for the form, could be 
obtained from a database.

form.load(feedback);
form.showForm(feedback-display);
form.save(feedback);
do-something-with-feedback(feedback);  // e.g. prepare some response.


In sitemap.xmap:

map:match pattern=*-display internal-only=true
  map:generate type=jx src=resource/internal/forms/{1}-template.xml /
  ...
/map:match

I have the feedback-definition.xml located in the given folder relative 
to the folder containing sitemap.xmpa. There is no separate map:match to 
this file. The statement above form = new Form(...) finds the file.






On 03/14/2012 09:41 PM, Mika M Lehtonen wrote:

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







--
Andre H. Juffer  | Phone: +358-8-553 1161
Biocenter Oulu and   | Fax: +358-8-553-1141
Department of Biochemistry   | Email: andre.juf...@oulu.fi
University of Oulu, Finland  | WWW: www.biochem.oulu.fi/Biocomputing

RE: pipeline in flowscript

2012-03-14 Thread Robby Pelssers
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/
   map:serialize/
/map:match

From: Mika M Lehtonen [mailto:m...@digikartta.net]
Sent: Wednesday, March 14, 2012 8:41 PM
To: users@cocoon.apache.org
Subject: Re: pipeline in flowscript

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.orgmailto: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.orgmailto: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.orgmailto:users-unsubscr...@cocoon.apache.org

For additional commands, e-mail: 
users-h...@cocoon.apache.orgmailto:users-h...@cocoon.apache.org





-

To unsubscribe, e-mail: 
users-unsubscr...@cocoon.apache.orgmailto:users-unsubscr...@cocoon.apache.org

For additional commands, e-mail: 
users-h...@cocoon.apache.orgmailto:users-h...@cocoon.apache.org






Re: pipeline in flowscript

2012-03-14 Thread Mika M Lehtonen

:-)
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/
map:serialize/
/map:match

*From:*Mika M Lehtonen [mailto:m...@digikartta.net]
*Sent:* Wednesday, March 14, 2012 8:41 PM
*To:* users@cocoon.apache.org
*Subject:* Re: pipeline in flowscript

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 mailto: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
  





Re: pipeline in flowscript

2012-03-14 Thread Mika M Lehtonen

And this one works!
var form = new Form(cocoon://samples/blocks/forms/registration.mika);

thanks,
- mika -

14.3.2012 22:11, Mika M Lehtonen kirjoitti:

:-)
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/
map:serialize/
/map:match

*From:*Mika M Lehtonen [mailto:m...@digikartta.net]
*Sent:* Wednesday, March 14, 2012 8:41 PM
*To:* users@cocoon.apache.org
*Subject:* Re: pipeline in flowscript

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 mailto: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
  







RE: pipeline in flowscript

2012-03-14 Thread Robby Pelssers
Ok..

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

E.g.
http://localhost:[port]/{webappCtxt}/{block}/registration.mikahttp://localhost:[port]/%7bwebappCtxt%7d/%7bblock%7d/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?!

Robby

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

From: Mika M Lehtonen [mailto:m...@digikartta.net]
Sent: Wednesday, March 14, 2012 8:41 PM
To: users@cocoon.apache.orgmailto:users@cocoon.apache.org
Subject: Re: pipeline in flowscript

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.orgmailto: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.orgmailto: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