Search in sources :

Example 1 with XulLabel

use of org.pentaho.ui.xul.components.XulLabel in project data-access by pentaho.

the class MessageHandler method showErrorDialog.

public void showErrorDialog(String title, String message, boolean showWizardDialog) {
    this.showWizardDialog = showWizardDialog;
    XulDialog errorDialog = (XulDialog) document.getElementById("errorDialog");
    errorDialog.setTitle(title);
    XulLabel errorLabel = (XulLabel) document.getElementById("errorLabel");
    errorLabel.setValue(message);
    errorDialog.show();
}
Also used : XulDialog(org.pentaho.ui.xul.containers.XulDialog) XulLabel(org.pentaho.ui.xul.components.XulLabel)

Example 2 with XulLabel

use of org.pentaho.ui.xul.components.XulLabel in project data-access by pentaho.

the class MessageHandler method showErrorDetailsDialog.

public void showErrorDetailsDialog(String title, String message, String detailMessage) {
    XulDialog errorDialog = (XulDialog) document.getElementById("errorDetailsDialog");
    errorDialog.setTitle(title);
    XulLabel errorLabel = (XulLabel) document.getElementById("errorDetailsLabel");
    errorLabel.setValue(message);
    XulLabel detailMessageBox = (XulLabel) document.getElementById("error_dialog_details");
    detailMessageBox.setValue(detailMessage);
    errorDialog.show();
}
Also used : XulDialog(org.pentaho.ui.xul.containers.XulDialog) XulLabel(org.pentaho.ui.xul.components.XulLabel)

Example 3 with XulLabel

use of org.pentaho.ui.xul.components.XulLabel in project pdi-dataservice-server-plugin by pentaho.

the class DataServiceRemapStepChooserDialogController method init.

public void init() throws InvocationTargetException, XulException {
    model.setServiceStep(stepNames.get(0));
    ((XulLabel) getElementById("label1")).setValue(BaseMessages.getString(PKG, "RemapStepChooserDialog.Label", dataService.getName()));
    SwtListbox steps = getElementById("trans-steps");
    steps.setElements(stepNames);
    BindingFactory bindingFactory = getBindingFactory();
    bindingFactory.setBindingType(Binding.Type.BI_DIRECTIONAL);
    bindingFactory.createBinding(model, "serviceStep", steps, "selectedItem").fireSourceChanged();
}
Also used : SwtListbox(org.pentaho.ui.xul.swt.tags.SwtListbox) XulLabel(org.pentaho.ui.xul.components.XulLabel) BindingFactory(org.pentaho.ui.xul.binding.BindingFactory)

Example 4 with XulLabel

use of org.pentaho.ui.xul.components.XulLabel in project pdi-dataservice-server-plugin by pentaho.

the class DataServiceTestController method bindErrorAlert.

private void bindErrorAlert(BindingFactory bindingFactory) throws InvocationTargetException, XulException {
    XulLabel errorAlert = (XulLabel) document.getElementById("error-alert");
    model.setAlertMessage("");
    bindingFactory.setBindingType(Binding.Type.ONE_WAY);
    Binding binding = bindingFactory.createBinding(model, "alertMessage", errorAlert, "value");
    binding.initialize();
    binding.fireSourceChanged();
}
Also used : Binding(org.pentaho.ui.xul.binding.Binding) XulLabel(org.pentaho.ui.xul.components.XulLabel)

Example 5 with XulLabel

use of org.pentaho.ui.xul.components.XulLabel in project pdi-dataservice-server-plugin by pentaho.

the class DataServiceTestController method bindStreamingWindowParameters.

private void bindStreamingWindowParameters(BindingFactory bindingFactory) {
    XulGroupbox streamingGroupBox = (XulGroupbox) document.getElementById("streaming-groupbox");
    streamingGroupBox.setVisible(dataService.isStreaming());
    XulRadio timeBasedRadio = (XulRadio) document.getElementById("time-based-radio");
    XulRadio rowBasedRadio = (XulRadio) document.getElementById("row-based-radio");
    XulTextbox sizeTextBox = (XulTextbox) document.getElementById("window-size");
    XulTextbox everyTextBox = (XulTextbox) document.getElementById("window-every");
    XulTextbox limitTextBox = (XulTextbox) document.getElementById("window-limit");
    XulLabel sizeTimeUnitLabel = (XulLabel) document.getElementById("window-size-time-unit");
    XulLabel everyTimeUnitLabel = (XulLabel) document.getElementById("window-every-time-unit");
    XulLabel limitTimeUnitLabel = (XulLabel) document.getElementById("window-limit-time-unit");
    XulLabel sizeRowUnitLabel = (XulLabel) document.getElementById("window-size-row-unit");
    XulLabel everyRowUnitLabel = (XulLabel) document.getElementById("window-every-row-unit");
    XulLabel limitRowUnitLabel = (XulLabel) document.getElementById("window-limit-row-unit");
    model.setWindowMode(IDataServiceClientService.StreamingMode.TIME_BASED);
    timeBasedRadio.setSelected(true);
    rowBasedRadio.setSelected(false);
    sizeTimeUnitLabel.setVisible(true);
    everyTimeUnitLabel.setVisible(true);
    limitTimeUnitLabel.setVisible(false);
    sizeRowUnitLabel.setVisible(false);
    everyRowUnitLabel.setVisible(false);
    limitRowUnitLabel.setVisible(true);
    sizeTextBox.setValue("");
    everyTextBox.setValue("");
    limitTextBox.setValue("");
    bindingFactory.setBindingType(Binding.Type.BI_DIRECTIONAL);
    bindingFactory.createBinding(model, "windowSize", sizeTextBox, "value", BindingConverters.longToStringEmptyZero());
    bindingFactory.createBinding(model, "windowEvery", everyTextBox, "value", BindingConverters.longToStringEmptyZero());
    bindingFactory.createBinding(model, "windowLimit", limitTextBox, "value", BindingConverters.longToStringEmptyZero());
    bindingFactory.createBinding(timeBasedRadio, "selected", sizeTimeUnitLabel, "visible");
    bindingFactory.createBinding(timeBasedRadio, "selected", everyTimeUnitLabel, "visible");
    bindingFactory.createBinding(timeBasedRadio, "!selected", limitTimeUnitLabel, "visible");
    bindingFactory.createBinding(timeBasedRadio, "!selected", sizeRowUnitLabel, "visible");
    bindingFactory.createBinding(timeBasedRadio, "!selected", everyRowUnitLabel, "visible");
    bindingFactory.createBinding(timeBasedRadio, "selected", limitRowUnitLabel, "visible");
    bindingFactory.createBinding(rowBasedRadio, "!selected", sizeTimeUnitLabel, "visible");
    bindingFactory.createBinding(rowBasedRadio, "!selected", everyTimeUnitLabel, "visible");
    bindingFactory.createBinding(rowBasedRadio, "selected", limitTimeUnitLabel, "visible");
    bindingFactory.createBinding(rowBasedRadio, "selected", sizeRowUnitLabel, "visible");
    bindingFactory.createBinding(rowBasedRadio, "selected", everyRowUnitLabel, "visible");
    bindingFactory.createBinding(rowBasedRadio, "!selected", limitRowUnitLabel, "visible");
}
Also used : XulRadio(org.pentaho.ui.xul.components.XulRadio) XulTextbox(org.pentaho.ui.xul.components.XulTextbox) XulLabel(org.pentaho.ui.xul.components.XulLabel) XulGroupbox(org.pentaho.ui.xul.containers.XulGroupbox)

Aggregations

XulLabel (org.pentaho.ui.xul.components.XulLabel)9 XulDialog (org.pentaho.ui.xul.containers.XulDialog)3 Bindable (org.pentaho.ui.xul.stereotype.Bindable)3 XulTextbox (org.pentaho.ui.xul.components.XulTextbox)2 IDatasourceInfo (org.pentaho.platform.dataaccess.datasource.IDatasourceInfo)1 LogicalModelSummary (org.pentaho.platform.dataaccess.datasource.beans.LogicalModelSummary)1 Binding (org.pentaho.ui.xul.binding.Binding)1 BindingFactory (org.pentaho.ui.xul.binding.BindingFactory)1 XulRadio (org.pentaho.ui.xul.components.XulRadio)1 XulGroupbox (org.pentaho.ui.xul.containers.XulGroupbox)1 SwtListbox (org.pentaho.ui.xul.swt.tags.SwtListbox)1