Converting an MXML data model in an ActionScript object
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical">
<mx:Panel title="Actionscript Data Model converted from MXML Data Model"
xmlns:mx="http://www.adobe.com/2006/mxml"
width="400" height="300">
<mx:Script>
private var myObject:Object;
[Bindable]
public function set dmOBJ(param:Object):void
{
myObject = param;
}
public function get dmOBJ():Object
{
return myObject;
}
</mx:Script>
<mx:Label text="{dmOBJ.name}" />
<mx:Label text="{dmOBJ.surname}" />
<mx:Label text="{dmOBJ.email}" />
</mx:Panel>
</mx:Application>