public class FieldBinding extends Object
ModelData
,
Field
Modifier and Type | Field and Description |
---|---|
protected com.extjs.gxt.ui.client.widget.form.Field |
field |
protected com.extjs.gxt.ui.client.data.ModelData |
model |
protected String |
property |
protected com.extjs.gxt.ui.client.store.Store |
store |
Constructor and Description |
---|
FieldBinding(com.extjs.gxt.ui.client.widget.form.Field field,
String property)
Creates a new binding instance.
|
Modifier and Type | Method and Description |
---|---|
void |
bind(com.extjs.gxt.ui.client.data.ModelData model)
Binds the model and field.
|
com.extjs.gxt.ui.client.binding.Converter |
getConverter()
Returns the bindings converter.
|
com.extjs.gxt.ui.client.widget.form.Field<Object> |
getField()
Returns the bound field.
|
com.extjs.gxt.ui.client.data.ModelData |
getModel()
Returns the bound model instance.
|
String |
getProperty()
Returns the model's bound property name.
|
com.extjs.gxt.ui.client.store.Store |
getStore()
Returns the binding's store.
|
boolean |
isUpdateOriginalValue()
Returns true if the field's original value is updated when the field is
bound.
|
protected Object |
onConvertFieldValue(Object value) |
protected Object |
onConvertModelValue(Object value) |
protected void |
onFieldChange(com.extjs.gxt.ui.client.event.FieldEvent e) |
protected void |
onModelChange(com.extjs.gxt.ui.client.data.PropertyChangeEvent event) |
void |
setConverter(com.extjs.gxt.ui.client.binding.Converter converter)
Sets the converter which is used to translate data types when updating
either the field or model.
|
void |
setStore(com.extjs.gxt.ui.client.store.Store<? extends com.extjs.gxt.ui.client.data.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.
|
protected com.extjs.gxt.ui.client.widget.form.Field field
protected com.extjs.gxt.ui.client.data.ModelData model
protected String property
protected com.extjs.gxt.ui.client.store.Store store
public FieldBinding(com.extjs.gxt.ui.client.widget.form.Field field, String property)
field
- the bound field for the bindingpublic void bind(com.extjs.gxt.ui.client.data.ModelData model)
model
- the model to be boundpublic com.extjs.gxt.ui.client.binding.Converter getConverter()
public com.extjs.gxt.ui.client.widget.form.Field<Object> getField()
public com.extjs.gxt.ui.client.data.ModelData getModel()
public String getProperty()
public com.extjs.gxt.ui.client.store.Store getStore()
public boolean isUpdateOriginalValue()
public void setConverter(com.extjs.gxt.ui.client.binding.Converter converter)
converter
- the converterpublic void setStore(com.extjs.gxt.ui.client.store.Store<? extends com.extjs.gxt.ui.client.data.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()
protected void onFieldChange(com.extjs.gxt.ui.client.event.FieldEvent e)
protected void onModelChange(com.extjs.gxt.ui.client.data.PropertyChangeEvent event)
Copyright © 2018. All Rights Reserved.