public abstract class AbstractFormBinding extends AbstractBinding
| Constructor and Description |
|---|
AbstractFormBinding(Binder binder,
BindingMember[] parents,
BindingMember member)
Creates a binding.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
verifyType()
Verifies that the type of the bean matches the type of the bound member.
|
addToModelListener, addToViewListener, addValidationListener, addValidator, createBindingEvent, createValidationContext, createValidationEvent, determineValidators, fireToModel, fireToView, fireValidated, getBinder, getBoundRootObject, getMember, getModelValue, getModelValue, getParentObject, getParents, getToModelListeners, getToViewListeners, getValidationListeners, getValidators, getViewType, isValidationRequired, removeToModelListener, removeToViewListener, removeValidationListener, removeValidator, setModelValue, setModelValue, setViewValue, toString, updateView, updateView, validate, viewComponentToStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetViewValue, isChangeable, isMandatory, setChangeable, setMandatorypublic AbstractFormBinding(Binder binder, BindingMember[] parents, BindingMember member)
binder - the binder managing this bindingparents - the members building the declaration chain to this member, null if this binding's member is in containermember - the member field to bindprotected void verifyType()
The verification only detects obvious type mismatches.
For example, if the member type is a Double and the component's type
is an Integer, there is no way to cast in either direction.
However, if a generic component deals with a supertype (let's say a PDO), the member type may be more specific, for example a Customer. In such cases, we cannot tell whether the component really returns a Customer. All we know is that it accepts a Customer for display but returns some PDO to the member.
As a consequence, the verification succeeds if the member type is assignable to the component's type or vice versa.
BindingException - if verification failsTentackle - a domain driven enterprise framework