Class sap.ui.model.PropertyBindingModule: sap/ui/model/PropertyBinding
The PropertyBinding is used to access single data values in the data model.
Constructor Summary
new sap.ui.model.PropertyBinding(oModel, sPath, oContext, mParameters?)Constructor for PropertyBinding
Events borrowed from class sap.ui.model.Binding
Method Summary
sap.ui.model.PropertyBinding.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.ui.model.PropertyBinding with name
sClassName
and enriches it with the information contained in oClassInfo
.sap.ui.model.PropertyBinding.getMetadata()Returns a metadata object for class sap.ui.model.PropertyBinding.
getExternalValue()Returns the current external value of the bound target which is formatted via a type or formatter function.
Methods borrowed from class sap.ui.model.Binding
attachAggregatedDataStateChange, attachChange, attachDataReceived, attachDataRequested, attachDataStateChange, attachEvents, attachRefresh, destroy, detachAggregatedDataStateChange, detachChange, detachDataReceived, detachDataRequested, detachDataStateChange, detachEvents, detachRefresh, fireDataReceived, fireDataRequested, initialize, isInitial, isRelative, isSuspended, refresh, suspend, updateRequired
Methods borrowed from class sap.ui.base.EventProvider
Methods borrowed from class sap.ui.base.Object
Constructor Detail
new sap.ui.model.PropertyBinding(oModel, sPath, oContext, mParameters?)
Constructor for PropertyBinding
Parameters:
{sap.ui.model.Model} | oModel | |
{string} | sPath | |
{sap.ui.model.Context} | oContext | |
{object} | mParameters? |
Method Detail
sap.ui.model.PropertyBinding.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.ui.model.PropertyBinding with name
sClassName
and enriches it with the information contained in oClassInfo
. oClassInfo
might contain the same kind of information as described in sap.ui.model.Binding.extend.
Parameters:
{string} | sClassName | Name of the class being created |
{object} | oClassInfo? | Object literal with information about the class |
{function} | FNMetaImpl? | Constructor function for the metadata object; if not given, it defaults to sap.ui.core.ElementMetadata |
Returns:
{function} | Created class / constructor function |
sap.ui.model.PropertyBinding.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.ui.model.PropertyBinding.
Returns:
{sap.ui.base.Metadata} | Metadata object describing this class |
getBindingMode(): sap.ui.model.BindingMode
Returns the binding mode
Returns:
{sap.ui.model.BindingMode} | the binding mode |
getExternalValue(): object
Returns the current external value of the bound target which is formatted via a type or formatter function.
Exceptions:
sap.ui.model.FormatException |
Returns:
{object} | the current value of the bound target |
getType(): sap.ui.model.Type
Returns the type if any for the binding.
Returns:
{sap.ui.model.Type} | the binding type |
getValue(): object
Returns the current value of the bound target
Returns:
{object} | the current value of the bound target |
resume()
Resumes the binding update. Change events will be fired again.
When the binding is resumed and the control value was changed in the meantime, the control value will be set to the current value from the model and a change event will be fired.
setBindingMode(sBindingMode)
Sets the binding mode
Parameters:
{sap.ui.model.BindingMode} | sBindingMode | the binding mode |
setExternalValue(oValue)
Sets the value for this binding. The value is parsed and validated against its type and then set to the binding. A model implementation should check if the current default binding mode permits setting the binding value and if so set the new value also in the model.
Parameters:
{object} | oValue | the value to set for this binding |
Exceptions:
sap.ui.model.ParseException | |
sap.ui.model.ValidateException |
setFormatter(fnFormatter)
Sets the optional formatter function for the binding.
Parameters:
{function} | fnFormatter | the formatter function for the binding |
setType(oType, sInternalType)
Sets the optional type and internal type for the binding. The type and internal type are used to do the parsing/formatting correctly. The internal type is the property type of the element which the value is formatted to.
Parameters:
{sap.ui.model.Type} | oType | the type for the binding |
{String} | sInternalType | the internal type of the element property which this binding is bound against. |