On Mon, 2003-11-24 at 23:54, Joe Latty wrote:
> I still think I am not quite explaining my problem very well.

No, I think I understood your problem.

> In a dropdown list of say 3 state codes I wish to default the selected value
> to "AK" this being the second value in the list.
> 
> Therefore the value of the dropdown list field is defaulted to "AK".
> 
> Is this possible within Woody? How do I select a value "in the list" as the
> default/selected?

sure, this is supposed to work.

I just tried the exact sample you gave in your first mail, and it works
perfectly for me.

Did you make any changes to the XSL's?

And did you do the setValue() call before the showForm() call? I hope I
don't insult you by asking such a stupid question ;-)

So this is what I tried:

> > > var states = [
> > >      { key: "AL", value: "Alabama" },
> > >      { key: "AK", value: "Alaska" },
> > >      { key: "WY", value: "Wyoming" }
> > >  ];
> > >
> > > I pass it into the form:
> > > form.showForm(uri, { "states" : states });
> > >
> > > and in the field I have the following element:
> > > <wd:selection-list type="flow-jxpath" list-path="states"
> > > value-path="key" label-path="value"/>
> > >
> > > How can I select a value eg "AK":
> > > form.getWidget("myStateDropDown").setValue("AK");

-- 
Bruno Dumon                             http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
[EMAIL PROTECTED]                          [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to