S - type of the objects contained within the table's items listpublic class DefaultFormTableBinder<S> extends AbstractBinder implements FormTableBinder<S>
| Constructor and Description |
|---|
DefaultFormTableBinder(BindableTableModel<S> model)
Creates a binder for a table.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addBinding(Binding binding)
Programmatically adds a binding to this form.
|
void |
assertAllBound()
Tests the binding.
The method verifies that all components of the form are bound and throws a BindingException if it finds at least one
unbound component.All unbound components are logged. |
int |
bind()
Binds objects to a form.
|
int |
bindAllInherited()
Binds objects to a form.
|
protected int |
doBind(BindingMember[] parents,
String parentMemberPath,
Class<?> parentClass,
boolean declaredOnly) |
FormTableBinding |
getBinding(int mColumn)
Gets a binding by component.
|
FormTableBinding |
getBinding(String bindingPath) |
Collection<? extends Binding> |
getBindings()
Gets the list of all bindings for this form.
|
Integer[] |
getBoundColumns()
Gets the list of all bound components of this form.
|
BindableTableModel<S> |
getModel()
Gets the table model.
|
Integer[] |
getUnboundColumns()
Gets the list of all unbound components of this form.
|
FormTableBinding |
removeBinding(int mColumn)
Programmatically removes a binding from the table.
|
FormTableBinding |
removeBinding(String bindingPath)
Programmatically removes a binding from this form.
|
void |
unbind()
Removes all bindings of the form.
|
addToModelListener, addToViewListener, addValidationListener, compareTo, equals, fireToModel, fireToView, fireValidated, getBindingProperty, getBindingProperty, getInstanceNumber, getToModelListeners, getToViewListeners, getValidationListeners, getValidationScope, hashCode, putBindingProperty, removeToModelListener, removeToViewListener, removeValidationListener, setValidationScopeclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitaddToModelListener, addToViewListener, addValidationListener, fireToModel, fireToView, fireValidated, getBindingProperty, getBindingProperty, getInstanceNumber, getToModelListeners, getToViewListeners, getValidationListeners, getValidationScope, putBindingProperty, removeToModelListener, removeToViewListener, removeValidationListener, setValidationScopecompareTopublic DefaultFormTableBinder(BindableTableModel<S> model)
model - the table model to bindpublic BindableTableModel<S> getModel()
FormTableBindergetModel in interface FormTableBinder<S>public int bindAllInherited()
The form and all components in the form's parent classes
and all members or submembers
annotated with the Bindable-annotation.
Inherited members will be included as well.
Notice that the object references are not kept in the binding.
CAUTION: expensive operation!
bindAllInherited in interface Binderpublic int bind()
The form will be scanned for members or submembers
annotated with the Bindable-annotation.
Inherited members will not be included.
Notice that the object references are not kept in the binding.
public void unbind()
public Collection<? extends Binding> getBindings()
getBindings in interface Binderpublic Integer[] getBoundColumns()
getBoundColumns in interface FormTableBinder<S>public Integer[] getUnboundColumns()
getUnboundColumns in interface FormTableBinder<S>public void assertAllBound()
throws BindingException
BindingException if it finds at least one
unbound component.assertAllBound in interface BinderBindingException - if at least one unbound component foundpublic void addBinding(Binding binding)
addBinding in interface Binderbinding - the binding to addpublic FormTableBinding getBinding(int mColumn)
FormTableBindergetBinding in interface FormTableBinder<S>mColumn - the model columnpublic FormTableBinding getBinding(String bindingPath)
FormTableBinderOverridden to cast.
getBinding in interface BindergetBinding in interface FormTableBinder<S>public FormTableBinding removeBinding(int mColumn)
FormTableBinderremoveBinding in interface FormTableBinder<S>mColumn - the model columnpublic FormTableBinding removeBinding(String bindingPath)
removeBinding in interface BinderremoveBinding in interface FormTableBinder<S>bindingPath - the object's binding pathprotected int doBind(BindingMember[] parents, String parentMemberPath, Class<?> parentClass, boolean declaredOnly)
doBind in class AbstractBinderTentackle - a domain driven enterprise framework