Browse files

added Jonathan's changes

  • Loading branch information...
1 parent a0acd05 commit 87e1c9714097dc21c7f097af12fdb6395f087b48 @seanhess committed Jun 3, 2009
View
9 examples/CafeTownsend/src/cafe/glue/MainGlue.mxml
@@ -38,12 +38,17 @@
<Command id="deleteEmployee">
<Action call="employeeManager.deleteEmployee()"/>
- <Action call="navManager.goBack()"/>
+ <Action call="goBack.execute()"/>
</Command>
<Command id="saveEmployee" employee="none">
<Action call="employeeManager.saveEmployee(scope.employee)"/>
+ <Action call="goBack.execute()"/>
+ </Command>
+
+ <Command id="goBack">
<Action call="navManager.goBack()"/>
+ <Action call="employeeManager.selectEmployee(null)"/>
</Command>
<!-- Manager -->
@@ -71,7 +76,7 @@
<Glue match="EmployeeDetail">
<Inject selectedEmployee="{employeeManager.employee}"/>
- <Route event="back" call="navManager.goBack()"/>
+ <Route event="back" call="goBack.execute()"/>
<Route event="remove" call="deleteEmployee.execute()"/>
<Route event="save" call="saveEmployee.execute({employee:view.tempEmployee})"/>
</Glue>
View
6 examples/CafeTownsend/src/cafe/manager/EmployeeManager.as
@@ -51,15 +51,15 @@ package cafe.manager
// clear out the selected employee just in case
selectEmployee(null);
}
-
+
public function newEmployee():void
{
var employee:Employee = new Employee();
employee.firstname = "";
employee.lastname = "";
- saveEmployee(employee);
- selectEmployee(employee);
+// saveEmployee(employee);
+// selectEmployee(employee);
}
// -----------------------------------------------------------

0 comments on commit 87e1c97

Please sign in to comment.