flex数据绑定

 

* 1 、方法绑定
   [Bindable(event="myFlagChanged")]
private function isEnabled():String {
if (myFlag)return 'true';
else return ‘false';
}
<mx:TextArea id="myTA" text="{isEnabled()}"/>
* 2 、对象绑定
[ Bindable ]
public var expenses:ArrayCollection = new ArrayCollection(
[{Month: "01" ,Profit:2000,Expenses:1500,Amount:450}]
);
<mx:LineChart id="lineChart" dataProvider="{expenses} >
</mx:LineChart>

你可能感兴趣的:(Flex)