Examples of XulTextbox


Examples of org.pentaho.ui.xul.components.XulTextbox

        fd.showOpenDialog();
        file = (File) fd.getFile();
        if (file != null)
        { // If the file is null then the user hit cancel
          final String filePath = file.getAbsolutePath();
          final XulTextbox fileTextBox = (XulTextbox) document.getElementById(WIZARD_FILENAME_TB_ID);
          fileTextBox.setValue(filePath);
          LookAndFeelStep.this.setFileName(filePath);
        }
      }
      catch (XulException e)
      {
View Full Code Here

Examples of org.pentaho.ui.xul.components.XulTextbox

        fd.showOpenDialog();
        file = (File) fd.getFile();
        if (file != null)
        { // If the file is null then the user hit cancel
          final String filePath = file.getAbsolutePath();
          final XulTextbox fileTextBox = (XulTextbox) document.getElementById(WIZARD_FILENAME_TB_ID);
          fileTextBox.setValue(filePath);
          LookAndFeelStep.this.setFileName(filePath);
        }
      }
      catch (XulException e)
      {
View Full Code Here

Examples of org.pentaho.ui.xul.components.XulTextbox

        waitDialog.hide();
      }

      XulDialog connectErrorDialog = (XulDialog) document.getElementById(CONNECT_ERROR_DIALOG);
      Assert.notNull(connectErrorDialog, "missing element from document");
      XulTextbox connectErrorDialogMessage = (XulTextbox) document.getElementById("connectErrorDialogMessage");
      Assert.notNull(connectErrorDialogMessage, "missing element from document");
      connectErrorDialogMessage.setValue(e.getLocalizedMessage());
      connectErrorDialog.show();

    }
  }
View Full Code Here

Examples of org.pentaho.ui.xul.components.XulTextbox

  public void showPreview() throws XulException {
    XulDialog previewDialog = (XulDialog) document.getElementById(ELEM_ID_PREVIEW_DIALOG);

    StringBuilder ddlBuf = new StringBuilder();
    List<UIAggregate> aggList = getEnabledAggs();
    XulTextbox ddlField = (XulTextbox) document.getElementById(ELEM_ID_DDL_FIELD);

    List<Output> outputs = new ArrayList<Output>();
    for (UIAggregate agg : aggList) {
      outputs.add(agg.getOutput());
    }

    if (outputs.size() > 0) {
      try {
        ddlBuf.append(outputService.getFullArtifact(outputs, CreateScriptGenerator.class));
      } catch (OutputValidationException e) {
        e.printStackTrace();
        // TODO mlowery show an error dialog before returning
        return;
      }

      ddlField.setValue(ddlBuf.toString());
    } else {
      ddlField.setValue(EMPTY_STRING);
    }

    StringBuilder dmlBuf = new StringBuilder();
    XulTextbox dmlField = (XulTextbox) document.getElementById(ELEM_ID_DML_FIELD);
    if (document.getElementById("dml_tabpanel") != null) {

      try {
        dmlBuf.append(outputService.getFullArtifact(outputs, PopulateScriptGenerator.class));
      } catch (OutputValidationException e) {
        e.printStackTrace();
        // TODO mlowery show an error dialog before returning
        return;
      }

      dmlField.setValue(dmlBuf.toString());
    }

    StringBuilder schemaBuf = new StringBuilder();
    XulTextbox multiDimSchemaField = (XulTextbox) document.getElementById("multiDimSchemaField");

    if (multiDimSchemaField != null) {
      outputs = new ArrayList<Output>();
      for (UIAggregate agg : aggList) {
        outputs.add(agg.getOutput());
      }

      try {
        schemaBuf.append(outputService.getFullArtifact(outputs, SchemaGenerator.class));
      } catch (OutputValidationException e) {
        e.printStackTrace();
        return;
      }

      multiDimSchemaField.setValue(schemaBuf.toString());
    }
    previewDialog.show();
  }
View Full Code Here

Examples of org.pentaho.ui.xul.components.XulTextbox

    previewDialog.hide();
  }

  public void copyDdlToClipboard() {
    try {
      XulTextbox ddlField = (XulTextbox) document.getElementById(ELEM_ID_DDL_FIELD);
      Assert.notNull(ddlField, "could not find element with id '" + ELEM_ID_DDL_FIELD + "'");
      ((XulWindow) document.getRootElement()).copy(ddlField.getValue());

    } catch (XulException e) {
      if (logger.isErrorEnabled()) {
        logger.error("an exception occurred", e);
      }
View Full Code Here

Examples of org.pentaho.ui.xul.components.XulTextbox

  }

  public void copyDmlToClipboard() {

    try {
      XulTextbox dmlField = (XulTextbox) document.getElementById(ELEM_ID_DML_FIELD);
      Assert.notNull(dmlField, "could not find element with id '" + ELEM_ID_DML_FIELD + "'");
      ((XulWindow) document.getRootElement()).copy(dmlField.getValue());

    } catch (XulException e) {
      if (logger.isErrorEnabled()) {
        logger.error("an exception occurred", e);
      }
View Full Code Here

Examples of org.pentaho.ui.xul.components.XulTextbox

      }
    }
  }

  public void copyToClipboardMultiDimPreview() {
    XulTextbox multiDimSchemaField = (XulTextbox) document.getElementById("multiDimSchemaField");
    try {
      ((XulWindow) document.getRootElement()).copy(multiDimSchemaField.getValue());
    } catch (XulException e) {
      if (logger.isErrorEnabled()) {
        logger.error("an exception occurred", e);
      }
    }
View Full Code Here

Examples of org.pentaho.ui.xul.components.XulTextbox

    dialog.show();

    // dialog.hide() in validationDone unblocks the above hide
   
    final XulDialog validationDialog1 = (XulDialog) document.getElementById("validationDialog1");
    final XulTextbox textbox = (XulTextbox) document.getElementById("validationMessages");
    textbox.setValue(ValidationHelper.messagesToString(validationMessages));
    validationDialog1.show();
    // reset
    boolean hasErrors = ValidationHelper.hasErrors(validationMessages);
    return hasErrors;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.