Search in sources :

Example 6 with XulServiceCallback

use of org.pentaho.ui.xul.XulServiceCallback 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);
    }
}
Also used : XulServiceCallback(org.pentaho.ui.xul.XulServiceCallback) IDatabaseType(org.pentaho.database.model.IDatabaseType) DatabaseTypeHelper(org.pentaho.database.util.DatabaseTypeHelper) GwtDatabaseDialog(org.pentaho.ui.database.gwt.GwtDatabaseDialog) ArrayList(java.util.ArrayList) IDatabaseConnectionList(org.pentaho.ui.database.event.IDatabaseConnectionList) List(java.util.List)

Aggregations

XulServiceCallback (org.pentaho.ui.xul.XulServiceCallback)6 List (java.util.List)4 IDatabaseType (org.pentaho.database.model.IDatabaseType)4 DatabaseTypeHelper (org.pentaho.database.util.DatabaseTypeHelper)4 Request (com.google.gwt.http.client.Request)3 RequestBuilder (com.google.gwt.http.client.RequestBuilder)3 RequestCallback (com.google.gwt.http.client.RequestCallback)3 RequestException (com.google.gwt.http.client.RequestException)3 Response (com.google.gwt.http.client.Response)3 ArrayList (java.util.ArrayList)3 IDatabaseConnectionList (org.pentaho.ui.database.event.IDatabaseConnectionList)2 Bindable (org.pentaho.ui.xul.stereotype.Bindable)2 BogoPojo (org.pentaho.agilebi.modeler.gwt.BogoPojo)1 GwtModelerServiceImpl (org.pentaho.agilebi.modeler.services.impl.GwtModelerServiceImpl)1 DSWUIDatasourceService (org.pentaho.platform.dataaccess.datasource.ui.service.DSWUIDatasourceService)1 JdbcDatasourceService (org.pentaho.platform.dataaccess.datasource.ui.service.JdbcDatasourceService)1 MetadataUIDatasourceService (org.pentaho.platform.dataaccess.datasource.ui.service.MetadataUIDatasourceService)1 MondrianUIDatasourceService (org.pentaho.platform.dataaccess.datasource.ui.service.MondrianUIDatasourceService)1 UIDatasourceServiceManager (org.pentaho.platform.dataaccess.datasource.ui.service.UIDatasourceServiceManager)1 DSWDatasourceServiceGwtImpl (org.pentaho.platform.dataaccess.datasource.wizard.service.impl.DSWDatasourceServiceGwtImpl)1