Class sap.ui.model.CompositeBindingModule: sap/ui/model/CompositeBinding


The CompositeBinding is used to bundle multiple property bindings which are be used to provide a single binding against these property bindings.

Constructor Summary
new sap.ui.model.CompositeBinding()Constructor for CompositeBinding
Method Summary
sap.ui.model.CompositeBinding.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.ui.model.CompositeBinding with name sClassName and enriches it with the information contained in oClassInfo.
sap.ui.model.CompositeBinding.getMetadata()Returns a metadata object for class sap.ui.model.CompositeBinding.
attachAggregatedDataStateChange(fnFunction, oListener?)Attach event-handler fnFunction to the 'AggregatedDataStateChange' event of this sap.ui.model.CompositeBinding.
attachChange(fnFunction, oListener?)Attach event-handler fnFunction to the '_change' event of this sap.ui.model.CompositeBinding.
attachDataStateChange(fnFunction, oListener?)Attach event-handler fnFunction to the 'DataStateChange' event of this sap.ui.model.CompositeBinding.
detachAggregatedDataStateChange(fnFunction, oListener?)Detach event-handler fnFunction from the 'AggregatedDataStateChange' event of this sap.ui.model.CompositeBinding.
detachChange(fnFunction, oListener?)Detach event-handler fnFunction from the '_change' event of this sap.ui.model.CompositeBinding.
detachDataStateChange(fnFunction, oListener?)Detach event-handler fnFunction from the 'DataStateChange' event of this sap.ui.model.CompositeBinding.
getBindings()Returns the property bindings contained in this composite binding.
getExternalValue()Returns the current external value of the bound target which is formatted via a type or formatter function.
getValue()Returns the raw values of the property bindings in an array.
initialize()Initialize the binding.
resume()Suspends the binding update.
setExternalValue(oValue)Sets the external value of a composite binding.
setType(oType, sInternalType)Sets the optional type and internal type for the binding.
setValue(aValues)Sets the values.
suspend()Suspends the binding update.
updateRequired(oModel)Determines if the property bindings in the composite binding should be updated by calling updateRequired on all property bindings with the specified model.
Methods borrowed from class sap.ui.base.Object
Constructor Detail
new sap.ui.model.CompositeBinding()
Constructor for CompositeBinding
Method Detail
sap.ui.model.CompositeBinding.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.ui.model.CompositeBinding 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.PropertyBinding.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.CompositeBinding.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.ui.model.CompositeBinding.
Returns:
{sap.ui.base.Metadata} Metadata object describing this class
attachAggregatedDataStateChange(fnFunction, oListener?)
Attach event-handler fnFunction to the 'AggregatedDataStateChange' event of this sap.ui.model.CompositeBinding. The CombinedDataStateChange event is fired asynchronously, meaning that the datastate object given as parameter of the event contains all changes that were applied to the datastate in the running thread.
Parameters:
{function}fnFunction The function to call, when the event occurs.
{object}oListener? object on which to call the given function.
attachChange(fnFunction, oListener?)
Attach event-handler fnFunction to the '_change' event of this sap.ui.model.CompositeBinding.
Parameters:
{function}fnFunction The function to call, when the event occurs.
{object}oListener? object on which to call the given function.
attachDataStateChange(fnFunction, oListener?)
Attach event-handler fnFunction to the 'DataStateChange' event of this sap.ui.model.CompositeBinding.
Parameters:
{function}fnFunction The function to call, when the event occurs.
{object}oListener? object on which to call the given function.
detachAggregatedDataStateChange(fnFunction, oListener?)
Detach event-handler fnFunction from the 'AggregatedDataStateChange' event of this sap.ui.model.CompositeBinding.
Parameters:
{function}fnFunction The function to call, when the event occurs.
{object}oListener? object on which to call the given function.
detachChange(fnFunction, oListener?)
Detach event-handler fnFunction from the '_change' event of this sap.ui.model.CompositeBinding.
Parameters:
{function}fnFunction The function to call, when the event occurs.
{object}oListener? object on which to call the given function.
detachDataStateChange(fnFunction, oListener?)
Detach event-handler fnFunction from the 'DataStateChange' event of this sap.ui.model.CompositeBinding.
Parameters:
{function}fnFunction The function to call, when the event occurs.
{object}oListener? object on which to call the given function.
getBindings(): array
Returns the property bindings contained in this composite binding.
Returns:
{array} the property bindings in this composite binding
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
getValue(): object
Returns the raw values of the property bindings in an array.
Returns:
{object} the values of the internal property bindings in an array
initialize()
Initialize the binding. The message should be called when creating a binding. The default implementation calls checkUpdate(true). Prevent checkUpdate to be triggered while initializing nestend bindings, it is sufficient to call checkUpdate when all nested bindings are initialized.
resume()
Suspends the binding update. No change events will be fired.

A refresh call with bForceUpdate set to true will also update the binding and fire a change in suspended mode. Special operations on bindings, which require updates to work properly (as paging or filtering in list bindings) will also update and cause a change event although the binding is suspended.

setExternalValue(oValue)
Sets the external value of a composite binding. If no CompositeType is assigned to the binding, the default implementation assumes a space separated list of values. This will cause the setValue to be called for each nested binding, except for undefined values in the array.
Parameters:
{object}oValue the value to set for this 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.CompositeType}oType the type for the binding
{String}sInternalType the internal type of the element property which this binding is bound against.
setValue(aValues)
Sets the values. This will cause the setValue to be called for each nested binding, except for undefined values in the array.
Parameters:
{array}aValues the values to set for this binding
suspend()
Suspends the binding update. No change events will be fired.

A refresh call with bForceUpdate set to true will also update the binding and fire a change in suspended mode. Special operations on bindings, which require updates to work properly (as paging or filtering in list bindings) will also update and cause a change event although the binding is suspended.

updateRequired(oModel): boolean
Determines if the property bindings in the composite binding should be updated by calling updateRequired on all property bindings with the specified model.
Parameters:
{object}oModel The model instance to compare against
Returns:
{boolean} true if this binding should be updated