From 9b1c18912f33135daf855d21f50fe236a5c56e46 Mon Sep 17 00:00:00 2001 From: Dan Buch Date: Thu, 18 Feb 2010 13:32:20 -0500 Subject: [PATCH] adding static employees crud example --- src/04-employee-crud/CRUDDynamic.mxml | 2 +- src/04-employee-crud/CRUDStatic.mxml | 34 +++++++++++++++++++ .../{employees.as => dyn-employees.as} | 0 src/04-employee-crud/static-employees.as | 20 +++++++++++ 4 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 src/04-employee-crud/CRUDStatic.mxml rename src/04-employee-crud/{employees.as => dyn-employees.as} (100%) create mode 100644 src/04-employee-crud/static-employees.as diff --git a/src/04-employee-crud/CRUDDynamic.mxml b/src/04-employee-crud/CRUDDynamic.mxml index 7a8b6de..2c98147 100644 --- a/src/04-employee-crud/CRUDDynamic.mxml +++ b/src/04-employee-crud/CRUDDynamic.mxml @@ -3,7 +3,7 @@ layout="absolute"> diff --git a/src/04-employee-crud/CRUDStatic.mxml b/src/04-employee-crud/CRUDStatic.mxml new file mode 100644 index 0000000..f487cd4 --- /dev/null +++ b/src/04-employee-crud/CRUDStatic.mxml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/04-employee-crud/employees.as b/src/04-employee-crud/dyn-employees.as similarity index 100% rename from src/04-employee-crud/employees.as rename to src/04-employee-crud/dyn-employees.as diff --git a/src/04-employee-crud/static-employees.as b/src/04-employee-crud/static-employees.as new file mode 100644 index 0000000..f6f02a4 --- /dev/null +++ b/src/04-employee-crud/static-employees.as @@ -0,0 +1,20 @@ +import mx.rpc.events.ResultEvent; + +private var params:Object; + +[Bindable] +private var result:XML; + +private function initApp():void{ + employeesService.cancel(); + params= new Object(); +} + +public function resultHandler(event:ResultEvent):void { + result = XML( event.result); +} + +public function fill():void{ + viewstack1.selectedIndex=1; + employeesService.send(params); +}