use of org.pentaho.ui.xul.XulException in project data-access by pentaho.
the class MultiTableDatasource method activating.
@Override
public void activating() throws XulException {
this.connectionSelectionStep.activating();
this.tablesSelectionStep.activating();
this.joinDefinitionsStep.activating();
XulVbox queryVbox = (XulVbox) document.getElementById("queryBox");
queryVbox.setVisible(false);
XulVbox metadataVbox = (XulVbox) document.getElementById("metadata");
metadataVbox.setVisible(true);
XulVbox connectionsVbox = (XulVbox) document.getElementById("connectionsLbl");
connectionsVbox.setVisible(true);
XulListbox connections = (XulListbox) document.getElementById("connectionList");
connections.setWidth(568);
connections.setHeight(275);
try {
// RPB: BISERVER-9258.
// conditionally hiding the selection of reporting vs reporting+olap in the case where reporting only makes no
// sense.
// bf.createBinding(wizardModel, "reportingOnlyValid", "metadata", "visible").fireSourceChanged();
// Use a binding to keep the radio buttons in sync
bf.setBindingType(Type.BI_DIRECTIONAL);
XulRadio olapRadio = (XulRadio) document.getElementById("reporting_analysis");
bf.createBinding(olapRadio, "checked", joinGuiModel, "doOlap");
bf.setBindingType(Type.ONE_WAY);
XulRadio reportingRadio = (XulRadio) document.getElementById("reporting");
bf.createBinding(wizardModel, "reportingOnlyValid", reportingRadio, "checked").fireSourceChanged();
} catch (Exception e) {
e.printStackTrace();
}
this.errorDialog = (XulDialog) document.getElementById("errorDialog");
this.errorLabel = (XulLabel) document.getElementById("errorLabel");
this.connectionSelectionStep.setValid(true);
this.setConnection(connectionSelectionStep.getConnection());
}
use of org.pentaho.ui.xul.XulException in project data-access by pentaho.
the class AnalysisImportDialogController method showMessagebox.
/**
* Shows a informational dialog.
*
* @param title title of dialog
* @param message message within dialog
*/
private void showMessagebox(final String title, final String message) {
try {
// $NON-NLS-1$
XulMessageBox messagebox = (XulMessageBox) document.createElement("messagebox");
messagebox.setTitle(title);
messagebox.setMessage(message);
int option = messagebox.open();
} catch (XulException e) {
Window.alert("Show MessabeBox " + e.getMessage());
}
}
use of org.pentaho.ui.xul.XulException in project data-access by pentaho.
the class MainWizardController method setSelectedDatasource.
@Bindable
public void setSelectedDatasource(IWizardDatasource datasource) {
IWizardDatasource prevSelection = activeDatasource;
activeDatasource = datasource;
if (datasource == null || prevSelection == activeDatasource) {
return;
}
try {
datasource.activating();
if (prevSelection != null) {
steps.removeAll(prevSelection.getSteps());
prevSelection.deactivating();
}
for (int i = 1; i < datasource.getSteps().size(); i++) {
steps.add(datasource.getSteps().get(i));
}
steps.addAll(datasource.getSteps());
wizardModel.setSelectedDatasource(datasource);
activeStep = 0;
updateBindings();
} catch (XulException e) {
// To change body of catch statement use File | Settings | File Templates.
e.printStackTrace();
}
}
use of org.pentaho.ui.xul.XulException in project data-access by pentaho.
the class DatasourceSelectionDialogController method showMessagebox.
/**
* Shows a informational dialog.
*
* @param title title of dialog
* @param message message within dialog
*/
private void showMessagebox(final String title, final String message) {
XulMessageBox messagebox = null;
try {
// $NON-NLS-1$
messagebox = (XulMessageBox) document.createElement("messagebox");
} catch (XulException e) {
e.printStackTrace();
return;
}
messagebox.setTitle(title);
messagebox.setMessage(message);
messagebox.open();
}
use of org.pentaho.ui.xul.XulException in project pentaho-kettle by pentaho.
the class DataHandlerTest method testShowMessage.
@Test
public void testShowMessage() throws Exception {
dataHandler.showMessage("MyMessage", false);
dataHandler.showMessage("MyMessage", true);
when(document.createElement("messagebox")).thenThrow(new XulException());
dataHandler.showMessage("MyMessage", false);
}
Aggregations