ClassInstanceCreation creation,
Expression[] arguments,
IModelResolver resolver,
IDatabindingsProvider provider) throws Exception {
if (BINDINGS.equals(signature)) {
BindingsInfo binding = new BindingsInfo();
binding.setTarget(m_observables.get(1), m_observables.get(1).getSelfProperty());
provider.getBindings().add(binding);
return binding;
}
//
if (FIELD_BINDINGS.equals(signature)
|| COMBOBOX_FIELD_BINDINGS.equals(signature)
|| TIME_FIELD_BINDINGS.equals(signature)
|| FORM_BINDING_1.equals(signature)
|| FORM_BINDING_2.equals(signature)) {
WidgetObserveInfo target = getBindableWidget(arguments[0]);
if (target == null) {
AbstractParser.addError(
editor,
"Widget argument '" + arguments[0] + "' not found",
new Throwable());
return null;
}
WidgetPropertyObserveInfo targetProperty = target.getSelfProperty();
Assert.isNotNull(targetProperty);
//
if (FORM_BINDING_1.equals(signature) || FORM_BINDING_2.equals(signature)) {
FormBindingInfo binding = new FormBindingInfo(target, targetProperty);
//
if (arguments.length == 2) {
boolean autobind = CoreUtils.evaluate(Boolean.class, editor, arguments[1]);
binding.setAutobind(autobind);
}
//
provider.getBindings().add(binding);
return binding;
}