cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Johnston <>
Subject Re: fd:multivaluefield -> direct the content of the two fields!!!
Date Sat, 16 Sep 2006 19:03:14 GMT
jantje wrote:
>>>> What do you mean by "generate"?  I presume you mean get the array data
> from some external source? 
>>>> The answer to your question will depend on what that external source is.

> Yes, I want to get it (the content of the array) out of a database.. f.i.
> with XSP..
> Is it possible to do this? is it possible to fill the array with some kind
> of redirection or somthing? (in flowscript)
> or can I set these values this in f.i. the form definition?

Okay, here are a couple possibilities:

1) Query the database from your flowscript.  You've got the full power 
of JDBC available to you; you can either write the query code directly 
in your flowscript or write a Java class that does the query and gets 
called by your flowscript.

2) If you really want to use a pipeline to do the query (e.g. XSP or 
SQLTransformer), you can have your flowscript call that pipeline and get 
the result as a DOM tree, and then grab the values out of it using the 

   var pipelineUtil = new;
   var dom = pipelineUtil.processToDOM("query-pipeline", {});
   var elements = dom.getElementsByTagName("...");
   var targetArray = [];
   for(var i=0; i<elements.getLength(); i++) {

(or something like that.)


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message