Rev | Line | |
---|
[1240] | 1 | /* SwitchAppViewCommand.as */
|
---|
| 2 |
|
---|
| 3 | package gov.va.med.edp.command
|
---|
| 4 | {
|
---|
| 5 | import com.adobe.cairngorm.commands.ICommand;
|
---|
| 6 | import com.adobe.cairngorm.control.CairngormEvent;
|
---|
| 7 | import gov.va.med.edp.model.TrackingModelLocator;
|
---|
| 8 | import gov.va.med.edp.control.SwitchAppViewEvent;
|
---|
| 9 |
|
---|
| 10 | public class SwitchAppViewCommand implements ICommand
|
---|
| 11 | {
|
---|
| 12 | private var model:TrackingModelLocator = TrackingModelLocator.getInstance();
|
---|
| 13 |
|
---|
| 14 | public function execute(event:CairngormEvent):void
|
---|
| 15 | {
|
---|
| 16 | var viewEvent: SwitchAppViewEvent = SwitchAppViewEvent(event);
|
---|
| 17 |
|
---|
| 18 | if ((viewEvent.view == TrackingModelLocator.VIEW_APP_EDIT_CLOSED) &&
|
---|
| 19 | (model.appViewState != TrackingModelLocator.VIEW_APP_EDIT_CLOSED)) {
|
---|
| 20 | model.logEdit.resetEntry();
|
---|
| 21 | model.logEntryList.resetSelection();
|
---|
| 22 | }
|
---|
| 23 |
|
---|
| 24 | if (model.logEdit.entry == null) {
|
---|
| 25 | model.logEdit.message = "No visit currently selected.";
|
---|
| 26 | }
|
---|
| 27 |
|
---|
| 28 | model.appViewState = viewEvent.view;
|
---|
| 29 | model.setEditState();
|
---|
| 30 | }
|
---|
| 31 | }
|
---|
| 32 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.