use of org.pentaho.ui.database.gwt.GwtDatabaseDialog in project data-access by pentaho.
the class WizardConnectionController method showEditConnectionDialog.
@Bindable
public void showEditConnectionDialog() {
datasourceModel.setEditing(true);
if (databaseDialog != null) {
IDatabaseConnection connection = datasourceModel.getSelectedRelationalConnection();
previousConnectionName = connection.getName();
existingConnectionName = previousConnectionName;
DatabaseConnection editConnection = new DatabaseConnection();
copyDatabaseConnectionProperties(connection, editConnection);
databaseDialog.setDatabaseConnection(editConnection);
databaseDialog.show();
} else {
databaseDialog = new GwtDatabaseDialog(databaseTypeHelper, GWT.getModuleBaseURL() + "dataaccess-databasedialog.xul", // $NON-NLS-1$
connectionSetter);
}
}
use of org.pentaho.ui.database.gwt.GwtDatabaseDialog in project data-access by pentaho.
the class WizardConnectionController method showAddConnectionDialog.
@Bindable
public void showAddConnectionDialog() {
datasourceModel.setEditing(false);
if (databaseDialog != null) {
previousConnectionName = null;
existingConnectionName = previousConnectionName;
databaseDialog.setDatabaseConnection(null);
databaseDialog.show();
} else {
databaseDialog = new GwtDatabaseDialog(databaseTypeHelper, GWT.getModuleBaseURL() + "dataaccess-databasedialog.xul", // $NON-NLS-1$
connectionSetter);
}
}
use of org.pentaho.ui.database.gwt.GwtDatabaseDialog in project data-access by pentaho.
the class ConnectionController method createNewDatabaseDialog.
private void createNewDatabaseDialog() {
if (databaseTypeHelper == null) {
XulServiceCallback<List<IDatabaseType>> callback = new XulServiceCallback<List<IDatabaseType>>() {
public void error(String message, Throwable error) {
Window.alert(message + ": " + error.getLocalizedMessage());
// error.printStackTrace();
}
public void success(List<IDatabaseType> retVal) {
databaseTypeHelper = new DatabaseTypeHelper(retVal);
databaseDialog = new GwtDatabaseDialog(databaseTypeHelper, GWT.getModuleBaseURL() + "dataaccess-databasedialog.xul", // $NON-NLS-1$
connectionSetter);
}
};
dialectService.getDatabaseTypes(callback);
} else {
databaseDialog = new GwtDatabaseDialog(databaseTypeHelper, GWT.getModuleBaseURL() + "dataaccess-databasedialog.xul", // $NON-NLS-1$
connectionSetter);
}
}
Aggregations