// assuming we have a nodeList
var max = nodeList.getLength(); var list = new Array(max); for(var i=1; i < max; i++) { var elem = nodeList.item(i); var code = elem.getAttribute("code"); var label = elem.getAttribute("description"); list[i] = {value:code, label:code} }
someWidget.setSelectionList(list, "value", "label");
When populating from Java you don't need to iterate over the java collection, but you can set the selection list directly.
Richard Huegill wrote:
but can't find any examples of how to create the 'anObject' in the correct form to be able to be used from teh flowscript.
For the above call to setSelectionList() you need a Collection filled with objects that provide a getValue() and a getLabel() method.
Joerg
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
