On Mar 16, 2004, at 11:30 PM, Ugo Cei wrote:
Il giorno 17/mar/04, alle 04:52, Mark Lundquist ha scritto:
See <http://wiki.cocoondev.org/Wiki.jsp?page=WoodyDatatypeReference>, namely the part on flow-jxpath selection lists.
OK, now I have a form with a selection list that I need to populate from flowscript — programmatically, not just calling setSelectionList(uri).
How do I do it?
Thanks a lot, Ugo. I never would have thought to look on the datatypes page! Maybe I will add a reference to it from the widget reference page or something.
A couple of questions:
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.)
2) Should the forms v2 flow API support the selection list widget? That would be nice, IMHO. WDYT?
Anyway, many thanks once again! ~ Mark
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]