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 |
Returns a metadata object for class sap.ui.model.CompositeBinding.
Returns:
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 |