See thread " Can a Woody selection-list relationship be not set?"
-----Original Message----- From: Ugo Cei [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 17, 2004 5:21 AM To: [EMAIL PROTECTED] Subject: Re: [forms] Populate selection list from flow Mark Lundquist wrote: > 1) I don't see a way to specify the initial selected value - i.e., > generate the "selected" attribute in the HTML <option> element. I > looked in the source code for FlowJXPathSelectionList just to see if I > was missing something... I think it would need to generate an <fi:value> > element as a child of the <fi:field>, is that correct? It does indeed > appear not to do this anywhere. Is that a deficiency of > FlowJXPathSelectionList? Do any workarounds come to mind? The two I > can think of are (a) set dynamic="true" and set up a pipeline to build > the <fd:selection-list>, and populate it from the SAX stream; or, (b) > revert to some client-side hack (using a hidden field, etc.) Just set the value of the field in the form model, either via binding or manually. I.e.: form.getWidget().getWidget("field-id").value = "key2"; form.showForm("uri", { "list" : [ { value: "key1", label: "One" }, { value: "key2", label: "Two" } ]); ... <fd:selection-list type="jxpath" list-path="list" value-path="value" label-path="label"/> ... This must work, as I do it all the time. Ugo --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
