use of org.activityinfo.ui.client.page.config.design.importer.SchemaImporterV2 in project activityinfo by bedatadriven.
the class DbEditor method onUIAction.
private void onUIAction(String actionId) {
if (UIActions.SAVE.equals(actionId)) {
save();
} else if (UIActions.DELETE.equals(actionId)) {
promptDeleteSelection();
} else if (UIActions.IMPORT.equals(actionId)) {
SchemaImportDialog dialog = new SchemaImportDialog(new SchemaImporterV2(service, db), new SchemaImporterV3(db.getId(), locator));
dialog.show().then(() -> {
refresh();
return null;
});
} else if (UIActions.EDIT.equals(actionId)) {
Optional<ResourceId> selectedFormId = getSelectedFormId();
if (selectedFormId.isPresent()) {
eventBus.fireEvent(new NavigationEvent(NavigationHandler.NAVIGATION_REQUESTED, new ResourcePlace(selectedFormId.get(), ResourcePage.DESIGN_PAGE_ID)));
}
} else if (UIActions.OPEN_TABLE.equals(actionId)) {
Optional<ResourceId> selectedFormId = getSelectedFormId();
if (selectedFormId.isPresent()) {
App3.openNewTable(selectedFormId.get());
}
}
}
Aggregations