cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mratl...@collegenet.com
Subject Re: dynamic flowscript
Date Thu, 04 Sep 2003 18:26:10 GMT
Chris,

Hey, cool.  Thanks.  Possibly a more elegant way to do what I want...

Cheers,
--Michael




Christopher Oliver <res1cf5x@verizon.net> 
09/04/03 10:56 AM
Please respond to
dev@cocoon.apache.org


To
dev@cocoon.apache.org
cc

Subject
Re: dynamic flowscript







function loadScript(pipelineURI, bizData) {
  var os = new java.io.ByteArrayOutputStream();
  cocoon.processPipelineTo(pipelineURI, bizData, os);
  var bytes = os.toByteArray();
  var str = new java.lang.String(bytes);
  eval(str);
}

mratliff@collegenet.com wrote:

>
> Chris,
>
> Could you be more explicit?  AFAIK processPipelineTo invokes a 
> pipeline and sends results to an output stream?  Are you saying I can 
> write a (js) file to disk and then load (execute) it with eval()?  Are 
> you referring to javascript eval(some-string) function? 
>
> Thanks,
> --Michael
>
> Christopher Oliver <res1cf5x@verizon.net> wrote on 09/03/2003 09:59:49 
PM:
>
> >
> > BTW you could use cocoon.processPipelineTo() to create your script and
> > then use eval() to load it.
> >
>




Mime
View raw message