cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Askild Aaberg Olsen" <ask...@xangeli.com>
Subject Re: fetch a string from another piple line by "cocoon://" in javascript?
Date Sun, 09 May 2004 21:16:17 GMT
Christina wrote:
>I have a pipeline which return a string
>Then i wander how to get that string in javascipt?
>I think it should be somemethod("cocoon://uri"), But would anybody tell me
which method I should use?
>Thanks!

I had a similar question some days ago, which Bruno Dumon answered with:

"org.apache.cocoon.components.flow.util.PipelineUtil.processToDOM(...)
will help you to execute a pipeline and capture the result in a DOM tree."

http://cocoon.apache.org/2.1/apidocs/org/apache/cocoon/components/flow/util/
PipelineUtil.html

Which lead to the following successfull snippet:

   var pipelineUtil =
cocoon.createObject(Packages.org.apache.cocoon.components.flow.util.Pipeline
Util);
   var document = pipelineUtil.processToDOM("some.cocoon.pipeline", null);
   cocoon.disposeObject(pipelineUtil);

Now you can iterate over this document with regular DOM-access, like JD
Daniels did in:
http://marc.theaimsgroup.com/?l=xml-cocoon-users&m=108087195410338&w=2

Askild



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


Mime
View raw message