示例#1
0
  @SuppressWarnings("unchecked")
  @Override
  protected void handleEvent(AppEvent event) {
    if (event.getType() == AppEvents.AuditEventEntryView) {

      searchCriteria = null;
      currentEntity = Registry.get(Constants.ENTITY_ATTRIBUTE_MODEL);

      initUI();

      if (Registry.get(Constants.AUDIT_EVENT_TYPE_CODES) != null) {
        List<AuditEventTypeWeb> auditEventTypes =
            (List<AuditEventTypeWeb>) Registry.get(Constants.AUDIT_EVENT_TYPE_CODES);
        /*
         * for (AuditEventTypeWeb type : auditEventTypes) { Info.display("Information", "Event Types: "+
         * type.getAuditEventTypeCd() + ", " + type.getAuditEventTypeName()); }
         */
        eventTypesStore.removeAll();
        eventTypesStore.add(auditEventTypes);
      }

    } else if (event.getType() == AppEvents.Logout) {

      Dispatcher.get().dispatch(AppEvents.Logout);

    } else if (event.getType() == AppEvents.AuditEventReceived) {

      // Info.display("Information", "EventReceived");
      store.removeAll();

      AuditEventEntryListWeb events = (AuditEventEntryListWeb) event.getData();
      if (events.getAuditEventEntries() != null) {
        store.add(events.getAuditEventEntries());
      }

      grid.getSelectionModel().select(0, true);
      grid.getSelectionModel().deselect(0);

      status.hide();
      searchButton.unmask();

    } else if (event.getType() == AppEvents.EntityByIdRequest) {

      RecordWeb record = (RecordWeb) event.getData();

      if (record != null) {
        identifierStore.removeAll();

        buildRefRecordInfoDialog();
        refRecordInfoDialog.show();

        displayEntityRecord(attributeFieldMap, record);
        displayEntityIdentifier(record);
      }

    } else if (event.getType() == AppEvents.Error) {
      String message = event.getData();
      MessageBox.alert("Information", "Failure: " + message, null);
    }
  }
 @Override
 protected void handleEvent(AppEvent event) {
   if (event.getType() == AppEvents.INIT) {
     initUI();
   } else if (event.getType() == AppEvents.NAV_STORAGE) {
     List<StorageEngine> engines = event.getData();
     if (engines != null) {
       storageEnginesPanel.getStore().add(engines);
     }
   }
 }
 public void handleEvent(AppEvent event) {
   EventType type = event.getType();
   if (type == AppEvents.Init) {
     onInit(event);
   } else if (type == AppEvents.Error) {
     onError((Throwable) event.getData());
   }
 }
示例#4
0
 @Override
 protected void handleEvent(AppEvent event) {
   super.handleEvent(event);
   EventType type = event.getType();
   if (type == AppEvents.MANAGEMENT_VIEW_EVENT) {
     onActivateView();
   }
 }
示例#5
0
 public void handleEvent(AppEvent event) {
   EventType type = event.getType();
   if (type == AppEvents.Init) {
     onInit(event);
   } else if (type == AppEvents.Login) {
     onLogin(event);
   } else if (type == AppEvents.Error) {
     onError(event);
   }
 }
 public void handleEvent(AppEvent event) {
   EventType type = event.getType();
   if (type.equals(PagamentoSellaEvents.ShowForm)) {
     forwardToView(pagamentroView, event);
     OrdineModel model = (OrdineModel) event.getData();
     pagamentroView.setPagamentoModel(model);
   } else {
     forwardToView(pagamentroView, event);
   }
 }
  /**
   * (non-Javadoc)
   *
   * @see com.extjs.gxt.ui.client.mvc.Controller#handleEvent(com.extjs.gxt.ui.client .mvc.AppEvent)
   */
  @Override
  public void handleEvent(AppEvent event) {
    if (event.getType() == MapWidgetEvents.ERASE_FEATURE) {
      onEraseFeature(event);
    }

    if (event.getType() == GeoPlatformEvents.UPDATE_CENTER) {
      onUpdateCenter();
    }

    if (event.getType() == MapWidgetEvents.DRAW_FEATURE) {
      onDrawFeature(event);
    }

    if (event.getType() == GeoPlatformEvents.USER_UPDATE_HIS_NAME) {
      onUserChangeHisName(event);
    }

    forwardToView(view, event);
  }
示例#8
0
  @SuppressWarnings("unchecked")
  @Override
  protected void handleEvent(AppEvent event) {

    if (event.getType() == AppEvents.ProfileView) {
      initUI();
      clearFormFields(false);

      updateUser = Registry.get(Constants.LOGIN_USER);
      displayRecords(updateUser);

    } else if (event.getType() == AppEvents.ProfileUpdateComplete) {

      status.hide();
      submitButton.unmask();

      updateUser = (UserWeb) event.getData();
      Registry.register(Constants.LOGIN_USER, updateUser);

      MessageBox.alert("Information", "User profile was successfully updated", listenInfoMsg);

    } else if (event.getType() == AppEvents.ProfileVarifyPasswordSuccess) {

      UserWeb user = copyUserFromGUI(updateUser);
      controller.handleEvent(new AppEvent(AppEvents.ProfileUpdateInitiate, user));

    } else if (event.getType() == AppEvents.ProfileVarifyPasswordFailure) {

      status.hide();
      submitButton.unmask();

      MessageBox.alert("Information", "Incorrect current password", listenInfoMsg);

    } else if (event.getType() == AppEvents.Error) {
      status.hide();
      submitButton.unmask();

      String message = event.getData();
      MessageBox.alert("Information", "Failure: " + message, listenFailureMsg);
    }
  }
示例#9
0
 @Override
 public void handleEvent(AppEvent event) {
   EventType type = event.getType();
   if (type == AppEvents.Init) {
     forwardToView(browseView, event);
   } else if (type == AppEvents.LoadMainData) {
     forwardToView(browseView, event);
   } else if (type == AppEvents.ResetFilter
       || type == AppEvents.ViewMoveDataProviderDialog
       || type == AppEvents.ViewMoveDataSetDialog
       || type == AppEvents.AutoRefreshData
       || type == AppEvents.RemoveGridOperations) {
     forwardToView(browseView, event);
   }
 }
 @Override
 public void handleEvent(AppEvent event) {
   EventType type = event.getType();
   if (type == MainEvents.Init) {
     forwardToView(reportView, event);
   }
   if (type == MainEvents.ReportGraphicTrustDiagram) {
     forwardToView(grdView, event);
   }
   if (type == MainEvents.ReportGraphicCancel) {
     forwardToView(grdView, event);
   }
   if (type == MainEvents.ReportGraphicTrustSPGrid) {
     forwardToView(tblSPView, event);
   }
   if (type == MainEvents.ReportGraphicTrustIPGrid) {
     forwardToView(tblIPView, event);
   }
 }
  @Override
  public void handleEvent(AppEvent event) {
    final EventType type = event.getType();

    if (type.equals(EnvCreateEvents.CreateRequest)) {
      LOG.finest("CreateRequest");
      final String name = event.<String>getData("name");
      final int floors = event.getData("floors");
      final Polygon outline = event.<Polygon>getData("outline");
      final List<ExtDevice> devices = event.<List<ExtDevice>>getData("devices");
      final List<ExtSensor> sensors = event.<List<ExtSensor>>getData("sensors");
      onCreateRequest(name, floors, outline, devices, sensors);

    } else

    /*
     * Pass through to view
     */
    {
      forwardToView(creator, event);
    }
  }
示例#12
0
  @Override
  protected void handleEvent(AppEvent event) {
    EventType eventType = event.getType();

    if (eventType.equals(CommonEvents.Init)) {
      onInit();
    } else if (eventType.equals(CommonEvents.Error)) {
      onError();
    } else if (eventType.equals(StudentEvents.NavigationPanelReady)) {
      onNavigationPanelReady(event);
    } else if (eventType.equals(StudentEvents.StudentsPanelReady)) {
      onStudentsPanelReady(event);
    } else if (eventType.equals(StudentEvents.InformationPanelReady)) {
      onInformationPanelReady(event);
    } else if (eventType.equals(StudentEvents.MenuBarReady)) {
      onMenuBarReady(event);
    } else if (eventType.equals(StudentEvents.StatusBarReady)) {
      onStatusBarReady(event);
    } else if (eventType.equals(StudentEvents.UIReady)) {
      onUIReady();
    }
  }
示例#13
0
 /*
  * (non-Javadoc)
  *
  * @see com.extjs.gxt.ui.client.mvc.View#handleEvent(com.extjs.gxt.ui.client.mvc.AppEvent)
  */
 @Override
 protected void handleEvent(AppEvent event) {
   if (event.getType() == GeofenceEvents.INIT_GEOFENCE_MAIN_UI) {
     initUI();
   }
 }