<?xml version="1.0" encoding="utf-8"?>
<mx:Application
xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns:controllers="com.wasi.employeeconsole.controllers.*"
pageTitle="Employee Management Console 1"
viewSourceURL="srcview/index.html">
<mx:Script>
<![CDATA[
import com.wasi.employeeconsole.models.CairngormModelLocator;
import com.wasi.employeeconsole.events.EmployeeEvent;
private function getList(event:MouseEvent):void
{
trace("Application getList");
new EmployeeEvent(EmployeeEvent.GET_LIST).dispatch();
}
]]>
</mx:Script>
<controllers:CairngormFrontController id="frontController" />
<mx:VBox width="800" height="562" y="10" x="10">
<mx:ApplicationControlBar width="100%" borderColor="#408080" fillColors="[#408080, #408080]" fillAlphas="[0.53, 0.53]" autoLayout="true">
<mx:Text text="Employee Management Console" fontSize="26" fontWeight="bold" fontStyle="italic" themeColor="#ff8000" alpha="0.52"/>
</mx:ApplicationControlBar>
<mx:HBox x="10" y="10" width="800" height="455" id="hbox1">
<mx:Panel id="listEmployeePanel" width="100%" height="455" layout="absolute" title="Employee List" cornerRadius="8" borderColor="#408080" fontSize="13">
<mx:DataGrid
id="dgrid"
dataProvider="{CairngormModelLocator.getInstance().employeeList}"
width="100%" height="411"
bottom="0" right="0">
<mx:columns>
<mx:DataGridColumn headerText="Employee ID" dataField="id"/>
<mx:DataGridColumn headerText="First Name" dataField="firstName"/>
<mx:DataGridColumn headerText="Last Name" dataField="lastName"/>
</mx:columns>
</mx:DataGrid>
</mx:Panel>
<mx:Panel id="editEmployeePanel" width="100%" height="455" layout="absolute" title="Edit Employee" cornerRadius="8" borderColor="#408080" fontSize="13">
<mx:Form id="editform" x="38.5" y="114">
<mx:FormItem label="Employee ID">
<mx:TextInput id="empID" editable="false" backgroundColor="#d7d7d7"/>
</mx:FormItem>
<mx:FormItem label="First Name">
<mx:TextInput id="fname"/>
</mx:FormItem>
<mx:FormItem label="Last Name">
<mx:TextInput id="lname"/>
</mx:FormItem>
</mx:Form>
<mx:Button x="73.5" y="257" label="Save" />
<mx:Button x="143.5" y="257" label="Delete" />
<mx:Button x="224.5" y="257" label="Cancel" />
</mx:Panel>
</mx:HBox>
<mx:ApplicationControlBar width="100%" borderColor="#408080" fillColors="[#408080, #408080]" fillAlphas="[0.55, 0.31]">
<mx:Button label="Refresh List" click="getList(event)"/>
<mx:Button label="Delete Selected Employee" id="button2"/>
<mx:Button label="Add New Employee" id="button1" />
</mx:ApplicationControlBar>
</mx:VBox>
</mx:Application>