use of org.pentaho.ui.xul.stereotype.Bindable in project data-access by pentaho.
the class DatasourceAdminDialogController method launchNewUI.
@Bindable
public void launchNewUI(String datasourceType) {
IUIDatasourceAdminService service = manager.getService(datasourceType);
String newUI = service.getNewUI();
if (newUI != null && newUI.length() > 0) {
if (newUI.indexOf("builtin:") >= 0) {
if (service.getType().equals(JdbcDatasourceService.TYPE)) {
entryPoint.showDatabaseDialog(adminDatasourceListener);
} else if (service.getType().equals(MondrianUIDatasourceService.TYPE)) {
entryPoint.showAnalysisImportDialog(adminDatasourceListener);
} else if (service.getType().equals(MetadataUIDatasourceService.TYPE)) {
entryPoint.showMetadataImportDialog(adminDatasourceListener);
} else if (service.getType().equals(DSWUIDatasourceService.TYPE)) {
entryPoint.showWizard(true, adminDatasourceListener);
}
} else if (newUI.indexOf("javascript:") >= 0) {
String script = newUI.substring(newUI.indexOf(":") + 1);
executeJavaScript(script);
}
}
}
use of org.pentaho.ui.xul.stereotype.Bindable in project data-access by pentaho.
the class DatasourceAdminDialogController method remove.
@Bindable
public void remove() {
IDatasourceInfo dsInfo = datasourceAdminDialogModel.getSelectedDatasource();
if (dsInfo == null) {
showErrorDialog("datasourceAdminErrorDialog.SELECT_DATASOURCE", "datasourceAdminErrorDialog.SELECT_DATASOURCE_DELETE");
return;
}
if (messageBundle != null) {
XulLabel removeDatasourceConfirmationDialogLabel = (XulLabel) removeDatasourceConfirmationDialog.getElementById("removeDatasourceConfirmationDialogLabel");
removeDatasourceConfirmationDialogLabel.setValue(messageBundle.getString(REMOVE_DS_MSG_ID, dsInfo.getName()));
}
removeDatasourceConfirmationDialog.show();
}
use of org.pentaho.ui.xul.stereotype.Bindable in project data-access by pentaho.
the class DatasourceAdminDialogController method removeDatasourceAccept.
@Bindable
public void removeDatasourceAccept() {
final IDatasourceInfo dsInfo = datasourceAdminDialogModel.getSelectedDatasource();
manager.remove(dsInfo, new XulServiceCallback<Boolean>() {
@Override
public void success(Boolean isOk) {
if (isOk) {
refreshDatasourceList();
editDatasourceMenuItem.setDisabled(true);
} else {
Window.alert(messageBundle.getString("datasourceAdminDialogController.COULD_NOT_REMOVE") + ": " + dsInfo.getId());
}
}
@Override
public void error(String message, Throwable error) {
Window.alert(messageBundle.getString("datasourceAdminDialogController.ERROR_REMOVING") + ": " + dsInfo.getId() + "." + messageBundle.getString("ERROR") + "=" + error.getLocalizedMessage());
}
});
removeDatasourceConfirmationDialog.hide();
}
use of org.pentaho.ui.xul.stereotype.Bindable in project data-access by pentaho.
the class StageDataStep method deselectAll.
@Bindable
public void deselectAll() {
// $NON-NLS-1$
XulTree tree = (XulTree) document.getElementById("csvModelDataTable");
for (XulComponent component : tree.getRootChildren().getChildNodes()) {
XulTreeItem item = (XulTreeItem) component;
for (XulComponent childComp : item.getChildNodes()) {
XulTreeRow row = (XulTreeRow) childComp;
XulTreeCell cell = row.getCell(0);
cell.setValue(false);
}
}
datasourceModel.getModelInfo().validate();
}
use of org.pentaho.ui.xul.stereotype.Bindable in project data-access by pentaho.
the class StageDataStep method selectAll.
@Bindable
public void selectAll() {
// $NON-NLS-1$
XulTree tree = (XulTree) document.getElementById("csvModelDataTable");
for (XulComponent component : tree.getRootChildren().getChildNodes()) {
XulTreeItem item = (XulTreeItem) component;
for (XulComponent childComp : item.getChildNodes()) {
XulTreeRow row = (XulTreeRow) childComp;
XulTreeCell cell = row.getCell(0);
cell.setValue(true);
}
}
datasourceModel.getModelInfo().validate();
}
Aggregations