}
private void finishBinding(Expression grid,
Expression bindingElement,
IDatabindingsProvider iprovider) throws Exception {
DatabindingsProvider provider = DatabindingsProvider.cast(iprovider);
BeansObserveTypeContainer beansContainer = provider.getBeansContainer();
WidgetsObserveTypeContainer widgetsContainer = provider.getWidgetsContainer();
//
WidgetObserveInfo gridWidget = widgetsContainer.getBindableWidget(grid);
m_model = gridWidget;
m_modelProperty = gridWidget.getSelfProperty();
//
ClassLoader classLoader = CoreUtils.classLoader(provider.getJavaInfoRoot());
String bindingElementClassName = AstNodeUtils.getFullyQualifiedName(bindingElement, true);
Class<?> bindingElementClass = classLoader.loadClass(bindingElementClassName);
//
m_gridSelectionModel =
new BeanObserveInfo(beansContainer.getBeanSupport(), m_modelProperty, bindingElementClass);
gridWidget.getSelfProperty().setProperties(
m_gridSelectionModel.getChildren(ChildrenContext.ChildrenForPropertiesTable));
//
for (FieldBindingInfo binding : m_fieldBindings) {
binding.setModel(
m_model,
m_gridSelectionModel.resolvePropertyReference(binding.getParsedProperty(), null));
binding.setGridSelectionModel(m_gridSelectionModel);
}
//
int index = provider.getBindings().indexOf(this);
provider.getBindings().addAll(index + 1, m_fieldBindings);
//
if (m_autobind) {
createAutobindings(m_fieldBindings, true);
}
}