cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Lucas-Smith <michael.lucas-sm...@wizardis.com.au>
Subject Flowscript and POST's
Date Mon, 22 Dec 2003 01:05:07 GMT
Hi,

I'm new to this crowd and I'm no Cocoon expert.
I've just started to play with the flowscript part of Cocoon and have
found it very interesting.

I've got an immediate use I can put it to in one of my company's
projects, but my lack of understanding has left me with a problem.

I have a situation where Cocoon is the web front end to a backend
system. Cocoon requests XML from the backend system.
I have some XSLT that outputs input forms against the XML's original
data and allows the user to POST in changes to the document.

I'd like to use flowscript to switch which page the user sees
depending on the success/failure of the backend operation.

Thus far I have:

<match pattern="**/*.form">
       <call function="submit">
             <parameter name="actionurl"
             value="resource/{1}/{2}.server"/>
             <parameter name="success" value="success.html"/>
             <parameter name="failure" value="../{1}/{2}.html"/>
       </call>
</match>

function submit() {
         var result = new Packages.java.io.byteArrayOutputStream();
         cocoon.processPipelineTo(cocoon.parameters.actionurl, {},
         result);
         result = result.toString();
         cocoon.redirectTo(cocoon.paramters.failure);
}

The POST goes to the .form match which then calls the flowscript.
Unfortunately, there doesn't appear to be an obvious way to POST on
this POST to the backend pipeline, which I was hoping to do using
processPipelineTo with my actionurl parameter.

Has any one got any idea how I can 'push' that POST on to my backend
easily?

-- 

Michael Lucas-Smith
Research and Development
Wizard Information Services, Australia



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


Mime
View raw message