@Override protected void onCcAreaDefinitionValueChanged() throws PresentationLogicException { if (form.lyr1().tabAreaDefinition().ccAreaDefinition().getContextMenuSelected() != null) { if (form.lyr1().tabAreaDefinition().ccAreaDefinition().getContextMenuSelected().equals(AreaDefinitionEvent.SENDTOCONFIG)) { form.lyr1().tabSendToConfig().setVisible(true); form.lyr1().tabSendToConfig().setHeaderEnabled(true); form.lyr1().tabAreaDefinition().setVisible(false); form.lyr1().tabAreaWorkspace().setVisible(false); form.lyr1().tabSendToConfig().ccSendToConfig().setFromAreaCombo(form.lyr1().tabAreaDefinition().ccAreaDefinition().getSelectedArea()); form.lyr1().tabSendToConfig().ccSendToConfig().initialize(true, null); form.lyr1().tabAreaDefinition().ccAreaDefinition().resetContextMenu(); form.setMode(FormMode.EDIT); } //WDEV-14894 else if (form.lyr1().tabAreaDefinition().ccAreaDefinition().getContextMenuSelected().equals(AreaDefinitionEvent.IMPORTAREADEFINITION)) { form.chkActive().setValue(false); form.lyr1().tabAreaDefinition().ccAreaDefinition().resetContextMenu(); } } }
@Override protected void onContextMenuItemClick(int menuItemID, ims.framework.Control sender) throws ims.framework.exceptions.PresentationLogicException { switch (menuItemID) { case GenForm.ContextMenus.EmergencyNamespace.AreaDefinition.Add: form.getGlobalContext().Emergency.setTrackingArea(null); form.getLocalContext().setSelectedEvent(null); engine.open(form.getForms().Emergency.AddEditArea); break; case GenForm.ContextMenus.EmergencyNamespace.AreaDefinition.Edit: form.getLocalContext().setSelectedEvent(AreaDefinitionEvent.EDIT); engine.open(form.getForms().Emergency.AddEditArea); break; case GenForm.ContextMenus.EmergencyNamespace.AreaDefinition.Remove: form.getLocalContext().setSelectedEvent(null); removeInstance(); break; case GenForm.ContextMenus.EmergencyNamespace.AreaDefinition.MoveDown: form.getLocalContext().setSelectedEvent(null); form.grdAreaDefinition().moveDown(); updateControlsState(); break; case GenForm.ContextMenus.EmergencyNamespace.AreaDefinition.MoveUp: form.getLocalContext().setSelectedEvent(null); form.grdAreaDefinition().moveUp(); updateControlsState(); break; case GenForm.ContextMenus.EmergencyNamespace.AreaDefinition.SendToConfig: form.getLocalContext().setSelectedEvent(AreaDefinitionEvent.SENDTOCONFIG); form.fireCustomControlValueChanged(); break; case GenForm.ContextMenus.EmergencyNamespace.AreaDefinition.ImportAreaDefinition: form.getGlobalContext().Emergency.setTrackingArea(null); form.getLocalContext().setSelectedEvent(AreaDefinitionEvent.IMPORTAREADEFINITION); form.fireCustomControlValueChanged(); engine.open(form.getForms().Emergency.EmergencyDepartmentsDialog); break; } }
@Override protected void onContextMenuItemClick(int menuItemID, ims.framework.Control sender) throws ims.framework.exceptions.PresentationLogicException { switch (menuItemID) { case GenForm.ContextMenus.EmergencyNamespace.AreaDefinition.Add: form.getGlobalContext().Emergency.setTrackingArea(null); form.getLocalContext().setSelectedEvent(null); engine.open(form.getForms().Emergency.AddEditArea, "Add Area"); break; case GenForm.ContextMenus.EmergencyNamespace.AreaDefinition.Edit: form.getLocalContext().setSelectedEvent(AreaDefinitionEvent.EDIT); engine.open(form.getForms().Emergency.AddEditArea, "Edit Area"); break; case GenForm.ContextMenus.EmergencyNamespace.AreaDefinition.Remove: form.getLocalContext().setSelectedEvent(null); removeInstance(); break; case GenForm.ContextMenus.EmergencyNamespace.AreaDefinition.MoveDown: form.getLocalContext().setSelectedEvent(null); form.grdAreaDefinition().moveDown(); updateControlsState(); break; case GenForm.ContextMenus.EmergencyNamespace.AreaDefinition.MoveUp: form.getLocalContext().setSelectedEvent(null); form.grdAreaDefinition().moveUp(); updateControlsState(); break; case GenForm.ContextMenus.EmergencyNamespace.AreaDefinition.SendToConfig: form.getLocalContext().setSelectedEvent(AreaDefinitionEvent.SENDTOCONFIG); form.fireCustomControlValueChanged(); break; case GenForm.ContextMenus.EmergencyNamespace.AreaDefinition.ImportAreaDefinition: form.getGlobalContext().Emergency.setTrackingArea(null); form.getLocalContext().setSelectedEvent(AreaDefinitionEvent.IMPORTAREADEFINITION); form.fireCustomControlValueChanged(); engine.open(form.getForms().Emergency.EmergencyDepartmentsDialog); break; } }
public AreaDefinitionEvent getContextMenuSelected() { return form.getLocalContext().getSelectedEvent(); }