Search in sources :

Example 11 with GwtBindingFactory

use of org.pentaho.ui.xul.gwt.binding.GwtBindingFactory in project data-access by pentaho.

the class MultiTableDatasource method init.

@Override
public void init(final XulDomContainer container, final IWizardModel wizardModel) throws XulException {
    this.wizardModel = wizardModel;
    document = container.getDocumentRoot();
    this.bf = new GwtBindingFactory(document);
    bf.setBindingType(Binding.Type.ONE_WAY);
    container.addEventHandler(connectionSelectionStep);
    container.addEventHandler(tablesSelectionStep);
    container.addEventHandler(joinDefinitionsStep);
    connectionSelectionStep.init(wizardModel);
    tablesSelectionStep.init(wizardModel);
    joinDefinitionsStep.init(wizardModel);
    bf.createBinding(connectionSelectionStep, "connection", this, "connection");
}
Also used : GwtBindingFactory(org.pentaho.ui.xul.gwt.binding.GwtBindingFactory)

Example 12 with GwtBindingFactory

use of org.pentaho.ui.xul.gwt.binding.GwtBindingFactory in project data-access by pentaho.

the class FileImportController method init.

@Bindable
public void init() {
    bf = new GwtBindingFactory(document);
    // $NON-NLS-1$
    fileUpload = (XulFileUpload) document.getElementById("fileUpload");
    // $NON-NLS-1$
    datasourceDialog = (XulDialog) document.getElementById("fileImportEditorWindow");
    // $NON-NLS-1$
    errorLabel = (XulLabel) document.getElementById("errorLabel");
    // $NON-NLS-1$
    errorDialog = (XulDialog) document.getElementById("errorDialog");
    BindingConvertor<String, Boolean> isDisabledConvertor = new BindingConvertor<String, Boolean>() {

        @Override
        public Boolean sourceToTarget(String aValue) {
            return (aValue == null || "".equals(aValue));
        }

        @Override
        public String targetToSource(Boolean aValue) {
            return null;
        }
    };
    bf.createBinding("fileUpload", "selectedFile", "okButton", "disabled", // $NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
    isDisabledConvertor);
}
Also used : GwtBindingFactory(org.pentaho.ui.xul.gwt.binding.GwtBindingFactory) BindingConvertor(org.pentaho.ui.xul.binding.BindingConvertor) Bindable(org.pentaho.ui.xul.stereotype.Bindable)

Aggregations

GwtBindingFactory (org.pentaho.ui.xul.gwt.binding.GwtBindingFactory)12 BindingFactory (org.pentaho.ui.xul.binding.BindingFactory)7 ResourceBundle (org.pentaho.gwt.widgets.client.utils.i18n.ResourceBundle)5 GwtDatasourceMessages (org.pentaho.platform.dataaccess.datasource.wizard.GwtDatasourceMessages)3 BindingConvertor (org.pentaho.ui.xul.binding.BindingConvertor)3 Bindable (org.pentaho.ui.xul.stereotype.Bindable)3 ArrayList (java.util.ArrayList)2 JoinTableModel (org.pentaho.agilebi.modeler.models.JoinTableModel)2 XulException (org.pentaho.ui.xul.XulException)2 GwtXulDomContainer (org.pentaho.ui.xul.gwt.GwtXulDomContainer)2 JsArray (com.google.gwt.core.client.JsArray)1 Request (com.google.gwt.http.client.Request)1 RequestBuilder (com.google.gwt.http.client.RequestBuilder)1 RequestCallback (com.google.gwt.http.client.RequestCallback)1 RequestException (com.google.gwt.http.client.RequestException)1 Response (com.google.gwt.http.client.Response)1 MenuBar (com.google.gwt.user.client.ui.MenuBar)1 MenuItem (com.google.gwt.user.client.ui.MenuItem)1 Collection (java.util.Collection)1 List (java.util.List)1