private void submitSearch() { List<ModelData> query = new ArrayList<ModelData>(); for (Field<?> field : formFields) { ModelData md = new BaseModelData(); MetaField mf = findField(field.getName()); if (mf == null || !enabledFields.containsKey(mf.getName()) || field.getValue() == null || field.getValue().toString().length() == 0 || !field.isValid()) { GWT.log("Will not submit field " + field.getName() + ".", null); continue; } md.set("field", mf); md.set("value", field.getValue()); query.add(md); } GWT.log("Submitting search with " + query.size() + " query elements.", null); AppEvent evt = new AppEvent(ApplicationEvents.SUBMIT_ADVANCED_SEARCH, query); evt.setData("asset", combo.getValue().getBean()); Dispatcher.forwardEvent(evt); }
public void handleEvent(AppEvent event) { EventType type = event.getType(); if (type == AppEvents.Init) { onInit(event); } else if (type == AppEvents.Error) { onError((Throwable) event.getData()); } }
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); } }
@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); } } }
@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) { super.handleEvent(event); EventType type = event.getType(); if (type == AppEvents.MANAGEMENT_VIEW_EVENT) { onActivateView(); } }
private void onStudentsPanelReady(AppEvent event) { Component component = event.getData(); if (component != null) { BorderLayoutData centerLayoutData = new BorderLayoutData(Style.LayoutRegion.CENTER); viewportPanel.add(component, centerLayoutData); } }
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); } }
/** * (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); }
private void onInformationPanelReady(AppEvent event) { Component component = event.getData(); if (component != null) { BorderLayoutData eastLayoutData = new BorderLayoutData(Style.LayoutRegion.EAST, 500, 200, 500); eastLayoutData.setCollapsible(true); eastLayoutData.setSplit(true); viewportPanel.add(component, eastLayoutData); } }
private void onNavigationPanelReady(AppEvent event) { Component component = event.getData(); if (component != null) { BorderLayoutData westLayoutData = new BorderLayoutData(Style.LayoutRegion.WEST, 200, 150, 400); westLayoutData.setCollapsible(true); westLayoutData.setSplit(true); viewportPanel.add(component, westLayoutData); } }
@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); } }
@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 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(); } }
@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); } }
protected void onError(AppEvent ae) { System.out.println("error: " + ae.<Object>getData()); }
/** @param event */ private void onEraseFeature(AppEvent event) { ((MapView) this.view).eraseFeature((VectorFeature) event.getData()); }
private void onMenuBarReady(AppEvent event) { viewportPanel.setTopComponent(event.<Component>getData()); }
private void onStatusBarReady(AppEvent event) { viewportPanel.setBottomComponent(event.<Component>getData()); }
private void onDrawFeature(AppEvent event) { ((MapView) this.view).drawFeature((VectorFeature) event.getData()); }
/* * (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(); } }