You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Brian Maddy <bm...@kampersoftware.com> on 2005/12/30 04:03:44 UTC
How do you call a pipeline from flowscript?
Hello everyone,
I'm trying to make a page similar to the Ajax Car selector example. I
would like to set the <fd:output id="message"> at the bottom with some
information gathered from a database. I have set up a pipeline to get
the information I need, but I can't seem to figure out how to call it
from the flowscript. Is it possible to call a pipeline from flowscript?
Here's a few thing that I've tried and didn't work:
this.value = cocoon.processPipelineTo("cocoon:/somePipe");
this.setValue("cocoon:/somePipe");
I'm using Cocoon version: 2.1.8
Thanks in advance!
Brian
Re: How do you call a pipeline from flowscript?
Posted by Jonas Lundberg <my...@gmail.com>.
This is an example of a flowscript calling a cocoon (2.1.7) pipeline:
function getResource() {
var input = Packages.java.lang.String(cocoon.parameters["input"]);
var page = Packages.java.lang.String(cocoon.parameters["page"]);
var site = Packages.java.lang.String(cocoon.parameters["site"]);
var output = new Packages.java.io.ByteArrayOutputStream();
cocoon.processPipelineTo("flow/locateimage/"+input+"?page="+page+"&site="+site,null,output);
var realFileName = output.toString();
cocoon.sendPage("flow/readimage/"+realFileName);
}
Regards
Hans
On 12/30/05, Brian Maddy <bm...@kampersoftware.com> wrote:
> Hello everyone,
>
> I'm trying to make a page similar to the Ajax Car selector example. I
> would like to set the <fd:output id="message"> at the bottom with some
> information gathered from a database. I have set up a pipeline to get the
> information I need, but I can't seem to figure out how to call it from the
> flowscript. Is it possible to call a pipeline from flowscript?
>
> Here's a few thing that I've tried and didn't work:
> this.value = cocoon.processPipelineTo("cocoon:/somePipe");
> this.setValue("cocoon:/somePipe");
>
> I'm using Cocoon version: 2.1.8
>
> Thanks in advance!
> Brian
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org