On Wed, 05 Nov 2003 22:53:23 +0100
Ugo Cei <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]