Constructor and Description |
---|
FieldBinding(Field field,
String property)
Creates a new binding instance.
|
Modifier and Type | Method and Description |
---|---|
void |
bind(ModelData model)
Binds the model and field.
|
Converter |
getConverter()
Returns the bindings converter.
|
Field<Object> |
getField()
Returns the bound field.
|
ModelData |
getModel()
Returns the bound model instance.
|
String |
getProperty()
Returns the model's bound property name.
|
Store |
getStore()
Returns the binding's store.
|
boolean |
isUpdateOriginalValue()
Returns true if the field's original value is updated when the field is
bound.
|
void |
setConverter(Converter converter)
Sets the converter which is used to translate data types when updating
either the field or model.
|
void |
setStore(Store<? extends ModelData> store)
Sets the store for the binding.
|
void |
setUpdateOriginalValue(boolean updateOriginalValue)
True to update the field's original value when bound (defaults to false).
|
void |
unbind()
Unbinds the model and field by removing all listeners.
|
void |
updateField()
Updates the field's value with the model value.
|
void |
updateField(boolean updateOriginalValue)
Updates the field's value and original value with the model value.
|
void |
updateModel()
Updates the model's value with the field value.
|
public void bind(ModelData model)
model
- the model to be boundpublic Converter getConverter()
public ModelData getModel()
public String getProperty()
public Store getStore()
public boolean isUpdateOriginalValue()
public void setConverter(Converter converter)
converter
- the converterpublic void setStore(Store<? extends ModelData> store)
store
- the storepublic void setUpdateOriginalValue(boolean updateOriginalValue)
updateOriginalValue
- true to update the original valuepublic void unbind()
public void updateField()
public void updateField(boolean updateOriginalValue)
updateOriginalValue
- true to update the original valuepublic void updateModel()
Copyright © 2015. All rights reserved.