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");
}
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);
}
Aggregations