Package org.pentaho.ui.xul.binding

Examples of org.pentaho.ui.xul.binding.BindingFactory


      bindingFactory.createBinding(wrapper, DrillDownModel.TOOLTIP_FORMULA_PROPERTY, "link-tooltip", "value");//NON-NLS
    }
    final XulComponent previewElement = doc.getElementById("preview");//NON-NLS
    if (previewElement != null)
    {
      final BindingFactory singleSourceBinding = new DefaultBindingFactory();
      singleSourceBinding.setBindingType(Binding.Type.ONE_WAY);
      singleSourceBinding.setDocument(doc);
      singleSourceBinding.createBinding(wrapper, "preview", "preview", "value");//NON-NLS
    }

    // we manage the binding between the table and the outside world manually
    wrapper.refresh();
    final XulComponent paramTableElement = doc.getElementById("parameter-table");//NON-NLS
View Full Code Here


    }
  }

  @RequestHandler
  public void onLoad() throws Exception {
    BindingFactory bf = bindingFactory;
    bf.setDocument(document);

    for (final SchemaProviderUiExtension extension : schemaProviders) {
      try {
        document.addOverlay(extension.getOverlayPath());
        getXulDomContainer().addEventHandler(extension);
       
        ((XulEventSource) extension).addPropertyChangeListener(new PropertyChangeListener() {

          public void propertyChange(PropertyChangeEvent evt) {
            boolean schemaAppliable = false;
            if (evt.getPropertyName().equals("schemaDefined") || evt.getPropertyName().equals("selected")) {
              logger.debug("*** got schemaDefined=" + evt.getNewValue()
                  + ", checking if any providers are applyable");
              for (SchemaProviderUiExtension ex : schemaProviders) {

                //De-select other extensions
                if(evt.getPropertyName().equals("selected") && extension != ex && evt.getNewValue() == Boolean.TRUE){
                  ex.setSelected(false);
                }
               
                if (ex.isSchemaDefined() && ex.isSelected()) {
                  logger.debug("provider " + ex.getName() + " is applyable");
                  schemaAppliable = true;
                } else {
                  logger.debug(ex.getName() + " NOT applyable: defined=[" + ex.isSchemaDefined() + "] selected=["
                      + ex.isSelected() + "]");
                }
              }
              connectionModel.setApplySchemaSourceEnabled(schemaAppliable);
            }
          }

        });
       
        bf.setBindingType(Binding.Type.ONE_WAY);
        bf.createBinding(connectionModel, "schemaLocked", extension, "!enabled");
       
//        extension.onLoad();
      } catch (XulException e) {
        logger.error("Error loading Schema Provider Overlay", e);
      }
    }

    bf.setBindingType(Binding.Type.BI_DIRECTIONAL);

    bf.createBinding(workspace, "applicationUnlocked", "open_advisor", "!disabled");
    bf.createBinding(workspace, "applicationUnlocked", "open_export", "!disabled");
    bf.createBinding(workspace, "applicationUnlocked", "agg_add_btn", "!disabled");
    bf.createBinding(connectionModel, "cubeNames", "cubeSelector", "elements");
    bf.createBinding(connectionModel, "cubeName", "cubeSelector", "selectedItem");

    bf.setBindingType(Binding.Type.ONE_WAY);

    bf.createBinding(connectionModel, "applySchemaSourceEnabled", "applySchemaSourceButton", "!disabled");
    bf.createBinding(connectionModel, "databaseName", "databaseName", "value");
    bf.createBinding(connectionModel, "cubeSelectionEnabled", "cubeSelector", "!disabled");

    bf.createBinding(connectionModel, "schemaLocked", "cubeSelector", "disabled");
    bf.createBinding(connectionModel, "schemaLocked", "applySchemaSourceButton", "disabled");
   
    bf.createBinding(connectionModel, "connectEnabled", "connection_dialog_accept", "!disabled").fireSourceChanged();

    connectionModel.addPropertyChangeListener(new PropertyChangeListener() {
      public void propertyChange(PropertyChangeEvent evt) {
        if (evt.getPropertyName().equals("selectedSchemaModel")) {
          SchemaModel model = (SchemaModel) evt.getNewValue();
View Full Code Here

      bindingFactory.createBinding(wrapper, DrillDownModel.TOOLTIP_FORMULA_PROPERTY, "link-tooltip", "value");//NON-NLS
    }
    final XulComponent previewElement = doc.getElementById("preview");//NON-NLS
    if (previewElement != null)
    {
      final BindingFactory singleSourceBinding = new DefaultBindingFactory();
      singleSourceBinding.setBindingType(Binding.Type.ONE_WAY);
      singleSourceBinding.setDocument(doc);
      singleSourceBinding.createBinding(wrapper, "preview", "preview", "value");//NON-NLS
    }

    // we manage the binding between the table and the outside world manually
    wrapper.refresh();
    final XulComponent paramTableElement = doc.getElementById("parameter-table");//NON-NLS
View Full Code Here

TOP

Related Classes of org.pentaho.ui.xul.binding.BindingFactory

Copyright © 2018 www.massapicom. 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.