Examples of XulDialog


Examples of org.pentaho.ui.xul.containers.XulDialog

    dialog.hide();
  }

  public void startAlgo() throws XulException {
    try {
      XulDialog dialog = (XulDialog) document.getElementById("progressDialog");
      PrintWriter pw = new PrintWriter(System.out);
      try {
        // hard coded params for now
        algorithmRunner.start(algorithmUiExtension.getAlgorithmParameters(), new Callback() {
          public void algorithmDone() {
            algoDone();
          }
        });
      } finally {
        pw.flush();
      }
      dialog.show();
     
      Result result = algorithmRunner.getResult();
      logger.debug("result=" + result);
 
      if (result == null || result.getAggregates() == null || result.getAggregates().size() == 0) {
View Full Code Here

Examples of org.pentaho.ui.xul.containers.XulDialog

    }
  }

  public void stopAlgo() {
    logger.debug("enter stopAlgo");
    XulDialog dialog = (XulDialog) document.getElementById("progressDialog");
    dialog.hide();
    algorithmRunner.stop();
  }
View Full Code Here

Examples of org.pentaho.ui.xul.containers.XulDialog

    algorithmRunner.stop();
  }

  private void algoDone() {
    logger.debug("enter algoDone");
    XulDialog dialog = (XulDialog) document.getElementById("progressDialog");
    dialog.hide();
   
  }
View Full Code Here

Examples of org.pentaho.ui.xul.containers.XulDialog

  @RequestHandler
  public void loadDatabaseDialog() {
    dataHandler.setData(connectionModel.getDatabaseMeta());

    XulDialog dialog = (XulDialog) document.getElementById(GENERAL_DATASOURCE_WINDOW);
    dialog.show();

    DatabaseMeta databaseMeta = (DatabaseMeta) dataHandler.getData();

    if (databaseMeta != null) {
      connectionModel.setDatabaseMeta(databaseMeta);
View Full Code Here

Examples of org.pentaho.ui.xul.containers.XulDialog

  //  TODO: What if cancel is pressed?
  @RequestHandler
  public void connect() {

    final XulDialog waitDialog = (XulDialog) document.getElementById(ANON_WAIT_DIALOG);
    try {
      if (selectedSchemaProvider == null) {
        throw new AggDesignerException(Messages.getString("select_olap_model"));
      }

      workspace.setApplicationUnlocked(false);

      new Thread() {
        @Override
        public void run() {
          try {
            while (waitDialog.isHidden()) {
              Thread.sleep(300);
            }
            ConnectionController.this.schema = selectedSchemaProvider.loadSchema(connectionModel.getCubeName());
          } catch (Exception e) {
            //consume, schema will be null which is checked outside of this thread
            logger.error("Error loading schema: ", e);
          } finally {
            waitDialog.hide();
          }
        }
      }.start();

      waitDialog.show();
      if (schema == null) {
        throw new AggDesignerException("Error loading Schema");
      }
      connectionModel.setSchema(schema);
      outputService.init(schema);
      connectionModel.setSchemaUpToDate(true);

      // don't unlock app until everything has succeeded.
      workspace.setApplicationUnlocked(true);
      hideConnectionDialog();
    } catch (Exception e) {
      logger.error("Unable to connect", e);
      if (!waitDialog.isHidden()) {
        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.containers.XulDialog

    }
  }

  @RequestHandler
  public void connectErrorDialogDismiss() {
    XulDialog connectErrorDialog = (XulDialog) document.getElementById(CONNECT_ERROR_DIALOG);
    Assert.notNull(connectErrorDialog, "missing element from document");
    if (!connectErrorDialog.isHidden()) {
      connectErrorDialog.hide();
    }
  }
View Full Code Here

Examples of org.pentaho.ui.xul.containers.XulDialog

  }

  @RequestHandler
  public void showConnectionDialog() {
    logger.debug("In Thread showing mondrian dialog");
    XulDialog connectionDialog = (XulDialog) document.getElementById(CONNECTION_DIALOG);
    connectionDialog.show();
  }
View Full Code Here

Examples of org.pentaho.ui.xul.containers.XulDialog

    connectionDialog.show();
  }

  @RequestHandler
  public void hideConnectionDialog() {
    XulDialog connectionDialog = (XulDialog) document.getElementById(CONNECTION_DIALOG);
    connectionDialog.hide();
  }
View Full Code Here

Examples of org.pentaho.ui.xul.containers.XulDialog

   * the cube selector widget with a list of available cubes in the schema.
   * @throws XulException
   */
  @RequestHandler
  public void apply() throws XulException {
    final XulDialog waitDialog = (XulDialog) document.getElementById(ANON_WAIT_DIALOG);

    logger.debug("starting thread");
    new Thread() {
      @Override
      public void run() {
        // don't proceed until the wait dialog is shown
        while (waitDialog.isHidden()) {
          try {
            logger.debug("waiting for wait dialog to show");
            sleep(500);
          } catch (InterruptedException e) {
            logger.error("an exception occurred", e);
            return;
          }
        }

        logger.debug("apply is running in separate thread");
        try {
          setSelectedSchemaProvider();
          if (selectedSchemaProvider == null) {
            throw new AggDesignerException(Messages.getString("select_olap_model"));
          }
          cubeNames = selectedSchemaProvider.getCubeNames();

        } catch (AggDesignerException e) {
          logger.error("Error loading OLAP schema", e);

          try {
            XulMessageBox box = (XulMessageBox) document.createElement("messagebox");
            box.setTitle("Error");
            box.setMessage(Messages.getString("Olap.apply.error"));
            box.open();
          } catch (XulException ex) {
          }

        } finally {
          logger.debug("hiding dialog if it isn't already hidden");
          waitDialog.hide();
        }

      }

    }.start();
    logger.debug("showing wait dialog");
    waitDialog.show();

    if (selectedSchemaProvider == null) {
      XulMessageBox box = (XulMessageBox) document.createElement("messagebox");
      box.setTitle("Error");
      box.setMessage("Error applying OLAP schema");
View Full Code Here

Examples of org.pentaho.ui.xul.containers.XulDialog

      msgBox.open();

      logger.info("Exiting showRelationalPreview as there are no Aggs defined");
      return;
    }
    XulDialog dialog = (XulDialog) document.getElementById(ELEM_ID_EXPORT_DIALOG);
    dialog.show();
  }
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.