cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joern Wallstabe" <joew...@rostock.igd.fhg.de>
Subject Re: woody: fill selection-list with result of database query ?
Date Thu, 06 Nov 2003 08:31:07 GMT
On Wed, 05 Nov 2003 22:53:23 +0100
Ugo Cei <u.cei@cbim.it> wrote:

> Sylvain Wallez wrote:
> > Joern Wallstabe wrote:
> >> I'm using cocoon 2.1.3 dev and would like to fill a selection-list in 
> >> a woody form dynamically
> >> using the result of a database query.
> >>
> >> How can I fill the selection-list from flowscript?
> >> .. using FlowJXPathSelectionList ?
> > The simplest way is to write a pipeline that does the database 
> > extraction e.g. with ESQL and use <wd:selection-list 
> > src="cocoon://esql-pipeline.xml" dynamic="true"/>
> > 
> > Sylvain
> 
> Sylvain, are you repudiating your own creation? ;-)
> 
> Joern, FlowJXPathSelection list is perfect for what you are trying to 
> accomplish. I bugged Sylvain to create it because I needed it for the 
> same reason. Please see the countryselector example in the latest CVS 
> version and don't hesitate to ask me if you need more help.
> 
> 	Ugo
> 
> 

Hi,

thanks for replying so quickly.

The countryselector example shows how to change a selection list inside an event handler.
Is this the only way e.g is there a <wd:load> to fill the list inside an event handler.

Can it be done without an event handler in flow like:
...
var states = [
    { key: "AL", value: "Alabama" },
    { key: "AK", value: "Alaska" },
    { key: "WY", value: "Wyoming" }
];

mylist=form.getWidget("list");
mylist.setSelectionList(states, "key", "value");

Thanks, joern

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


Mime
View raw message