source: EDIS/tags/ed/tracking-ui-core/src/main/flex/gov/va/med/edp/command/SwitchAppViewCommand.as@ 1240

Last change on this file since 1240 was 1240, checked in by George Lilly, 13 years ago

new version from the VA

File size: 974 bytes
Line 
1/* SwitchAppViewCommand.as */
2
3package 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.