box-o-sand/flex-practice/03a3-crud-static/CRUDStatic.mxml

35 lines
1.4 KiB
Plaintext
Raw Normal View History

2010-02-18 18:32:20 +00:00
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="initApp()">
<mx:Script>
<![CDATA[
include "static-employees.as";
]]>
</mx:Script>
<mx:HTTPService
id="employeesService"
url="http://www.flexmonkeys.com/F3GSE/PartIII/CRUD/employees.xml"
resultFormat="e4x"
result="resultHandler(event)" />
<mx:ViewStack id="viewstack1" width="100%" height="100%" >
<mx:Canvas label="Form View" width="100%" height="100%">
<mx:Form horizontalCenter="0" verticalCenter="0" backgroundColor="#FFFFFF">
<mx:FormItem label="Query Employees ">
<mx:Button label="Submit" click="fill()" width="100"/>
</mx:FormItem>
</mx:Form>
</mx:Canvas>
<mx:Panel label="DataGrid View" width="100%" height="100%">
<mx:DataGrid width="100%" height="100%" dataProvider="{result.employee}">
<mx:columns>
<mx:DataGridColumn dataField="firstName" headerText="First Name"/>
<mx:DataGridColumn dataField="lastName" headerText="Last Name"/>
<mx:DataGridColumn dataField="officePhone" headerText="Phone"/>
</mx:columns>
</mx:DataGrid>
</mx:Panel>
</mx:ViewStack>
</mx:Application>