public class DefaultFormComponentBinding extends AbstractFormBinding implements FormComponentBinding
| Constructor and Description |
|---|
DefaultFormComponentBinding(FormComponentBinder binder,
BindingMember[] parents,
BindingMember member,
FormComponent component,
String componentOptions)
Creates a binding.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
determineValidators() |
void |
fireToView(Object parent,
Object modelValue) |
FormComponentBinder |
getBinder() |
protected Object |
getBoundRootObject() |
FormComponent |
getComponent()
Gets the component which is bound to the member.
|
protected Class<?> |
getViewType()
Determines the component's type.
This is an estimation derived from the getter and setter methods, usually setViewValue and getViewValue. |
Object |
getViewValue() |
boolean |
isChangeable() |
boolean |
isMandatory() |
protected boolean |
isValidationRequired() |
protected boolean |
processOption(FormFieldComponent comp,
String option)
Processes an option for a component.
|
protected void |
processOptions(String componentOptions)
Process the component options.
|
void |
setChangeable(boolean changeable) |
void |
setMandatory(boolean mandatory) |
protected void |
updateComponentName()
Sets the component name to some meaningful value.
Required by some GUI testing tools. |
protected void |
updateView(Object value) |
protected String |
viewComponentToString() |
verifyTypeaddToModelListener, addToViewListener, addValidationListener, addValidator, createBindingEvent, createValidationContext, createValidationEvent, fireToModel, fireValidated, getMember, getModelValue, getModelValue, getParentObject, getParents, getToModelListeners, getToViewListeners, getValidationListeners, getValidators, removeToModelListener, removeToViewListener, removeValidationListener, removeValidator, setModelValue, setModelValue, setViewValue, toString, updateView, validateclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddToModelListener, addToViewListener, addValidationListener, addValidator, createBindingEvent, createValidationContext, createValidationEvent, fireToModel, fireValidated, getMember, getModelValue, getParentObject, getParents, getToModelListeners, getToViewListeners, getValidationListeners, getValidators, removeToModelListener, removeToViewListener, removeValidationListener, removeValidator, setModelValue, setViewValue, validatepublic DefaultFormComponentBinding(FormComponentBinder binder, BindingMember[] parents, BindingMember member, FormComponent component, String componentOptions)
binder - the binder managing this bindingcomponent - the GUI-component to bindcomponentOptions - options to configure the component.parents - the members building the declaration chain to this member, null if this binding's member is in containermember - the member field to bindpublic FormComponentBinder getBinder()
getBinder in interface BindinggetBinder in interface FormComponentBindinggetBinder in class AbstractBindingpublic FormComponent getComponent()
FormComponentBindinggetComponent in interface FormComponentBindingpublic Object getViewValue()
getViewValue in interface Bindingpublic void fireToView(Object parent, Object modelValue) throws BindingVetoException
fireToView in interface BindingfireToView in class AbstractBindingBindingVetoExceptionprotected void determineValidators()
determineValidators in class AbstractBindingprotected Class<?> getViewType()
getViewType in class AbstractBindingprotected void updateComponentName()
The component name will be the memberPath prepended
with the names of the parent components, each separated by a slash.
Example:
"Shipment/ShipmentFile/Booking/shipment.customer.addressNumber"
protected void processOptions(String componentOptions)
componentOptions - the options from the annotationprotected boolean processOption(FormFieldComponent comp, String option)
comp - the componentoption - the optionpublic void setMandatory(boolean mandatory)
setMandatory in interface Bindingpublic boolean isMandatory()
isMandatory in interface Bindingpublic void setChangeable(boolean changeable)
setChangeable in interface Bindingpublic boolean isChangeable()
isChangeable in interface Bindingprotected Object getBoundRootObject()
getBoundRootObject in class AbstractBindingprotected boolean isValidationRequired()
isValidationRequired in class AbstractBindingprotected String viewComponentToString()
viewComponentToString in class AbstractBindingprotected void updateView(Object value)
updateView in class AbstractBindingTentackle - distributed, domain- and model-driven