abstract class sap.ui.model.PropertyBinding

Visiblity: public
UX Guidelines:
Implements:
Available since: N/A
Module: sap/ui/model/PropertyBinding
Application Component: CA-UI5-COR

The PropertyBinding is used to access single data values in the data model.


Constructor

Constructor for PropertyBinding

new sap.ui.model.PropertyBinding(oModel, sPath, oContext, mParameters?)
Param Type Default Value Description
oModel sap.ui.model.Model
sPath string
oContext sap.ui.model.Context
mParameters? object

Methods Overview

Method Description
sap.ui.model.PropertyBinding.extend

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.

getBindingMode

Returns the binding mode.

getExternalValue

Returns the current external value of the bound target which is formatted via a type or formatter function.

getFormatter

Returns the formatter function.

getInternalValue

Returns the related JavaScript primitive value of the bound target which is parsed by the model format of this binding's type. If this binding doesn't have a type, the original value which is stored in the model is returned.

This method will be used when targetType is set to "internal" or when it's included in a CompositeBinding and the CompositeBinding needs to have the related JavaScript primitive values for its type or formatter.

sap.ui.model.PropertyBinding.getMetadata

Returns a metadata object for class sap.ui.model.PropertyBinding.

getRawValue

Returns the raw model value, as it exists in the model dataset.

This method will be used when targetType of a binding is set to "raw" or when it's include in a CompositeBinding and the CompositeBinding needs to have the related JavaScript primitive values for its type or formatter.

getType

Returns the type (if any) for the binding.

getValue

Returns 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

Sets the binding mode.

setExternalValue

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 in the model, too.

setFormatter

Sets the optional formatter function for the binding.

setInternalValue

Sets the value for this binding with the related JavaScript primitive type. The value is formatted with the model format and validated against its type and then set to the model.

setRawValue

Sets the value for this binding with the raw model value. This setter will perform type validation, in case a type is defined on the binding.

setType

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.

setValue

Sets the value for this binding. A model implementation should check if the current default binding mode permits setting the binding value, and if so, set the new value in the model, too.

sap.ui.model.PropertyBinding.extend

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.

Param Type DefaultValue Description
sClassName string

Name of the class being created

oClassInfo object

Object literal with information about the class

FNMetaImpl function

Constructor function for the metadata object; if not given, it defaults to the metadata implementation used by this class

getBindingMode

Returns the binding mode.

getExternalValue

Returns the current external value of the bound target which is formatted via a type or formatter function.

getFormatter

Returns the formatter function.

getInternalValue

Returns the related JavaScript primitive value of the bound target which is parsed by the model format of this binding's type. If this binding doesn't have a type, the original value which is stored in the model is returned.

This method will be used when targetType is set to "internal" or when it's included in a CompositeBinding and the CompositeBinding needs to have the related JavaScript primitive values for its type or formatter.

sap.ui.model.PropertyBinding.getMetadata

Returns a metadata object for class sap.ui.model.PropertyBinding.

getRawValue

Returns the raw model value, as it exists in the model dataset.

This method will be used when targetType of a binding is set to "raw" or when it's include in a CompositeBinding and the CompositeBinding needs to have the related JavaScript primitive values for its type or formatter.

getType

Returns the type (if any) for the binding.

getValue

Returns 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

Sets the binding mode.

Param Type DefaultValue Description
sBindingMode sap.ui.model.BindingMode

The binding mode

setExternalValue

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 in the model, too.

Param Type DefaultValue Description
vValue any

The value to set for this binding

setFormatter

Sets the optional formatter function for the binding.

Param Type DefaultValue Description
fnFormatter function

The formatter function for the binding

setInternalValue

Sets the value for this binding with the related JavaScript primitive type. The value is formatted with the model format and validated against its type and then set to the model.

Param Type DefaultValue Description
vValue any

The value to set for this binding

setRawValue

Sets the value for this binding with the raw model value. This setter will perform type validation, in case a type is defined on the binding.

Param Type DefaultValue Description
vValue any

The value to set for this binding

setType

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.

Param Type DefaultValue Description
oType sap.ui.model.Type

The type for the binding

sInternalType string

The internal type of the element property which this binding is bound against.

setValue

Sets the value for this binding. A model implementation should check if the current default binding mode permits setting the binding value, and if so, set the new value in the model, too.

Param Type DefaultValue Description
vValue any

the value to set for this binding