use of org.pentaho.platform.dataaccess.datasource.wizard.IDatasourceSummary in project data-access by pentaho.
the class MultiTableDatasource method onFinish.
@Override
public void onFinish(final XulServiceCallback<IDatasourceSummary> callback) {
if (this.validator.allTablesJoined()) {
String dsName = this.wizardModel.getDatasourceName();
MultiTableDatasourceDTO dto = this.joinGuiModel.createMultiTableDatasourceDTO(dsName);
dto.setSelectedConnection(this.connection);
joinSelectionServiceGwtImpl.serializeJoins(dto, this.connection, new XulServiceCallback<IDatasourceSummary>() {
public void success(IDatasourceSummary retVal) {
callback.success(retVal);
}
public void error(String message, Throwable error) {
MessageHandler.getInstance().closeWaitingDialog();
MessageHandler.getInstance().showErrorDetailsDialog(MessageHandler.getString("ERROR"), MessageHandler.getString("multitable.ERROR_SAVING_MODEL"), error.getLocalizedMessage());
}
});
} else {
MessageHandler.getInstance().closeWaitingDialog();
XulDialog wizardDialog = (XulDialog) document.getElementById("main_wizard_window");
wizardDialog.show();
this.displayErrors(this.validator.getError());
}
}
Aggregations