//actionscript
[Bindable] var comboList:Array = new Array();
var myPicklistValues:ArrayCollection = new ArrayCollection();
apex.describeSObjects(["Task"],
new AsyncResponder(function (result:Object):void
{
myPicklistValues = result[0].fields.Status.picklistValues;
for (var p:int=0;p<myPicklistValues.length;p++)
{
if (myPicklistValues[p].active)
{
var foo:PickListEntry = myPicklistValues[p].label;
comboList.push(foo);
}
}
}
}, genericFault));
//Flex code
<mx:ComboBox width="180" dataProvider="{comboList}" />
Banter
No comments for “populating a flex combobox with picklist values”
Post a comment