Abstract Class sap.ui.model.ContextModule: sap/ui/model/Context
The Context is a pointer to an object in the model data, which is used to allow definition of relative bindings, which are resolved relative to the defined object. Context elements are created either by the ListBinding for each list entry or by using createBindingContext.
Constructor Summary
Method Summary
sap.ui.model.Context.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.ui.model.Context with name
sClassName
and enriches it with the information contained in oClassInfo
.getObject(sPath)Gets the (model dependent) object the context points to or the object with the given relative binding path
Methods borrowed from class sap.ui.base.Object
Constructor Detail
new sap.ui.model.Context(oModel, sPath, oContext)
Constructor for Context class.
Parameters:
{sap.ui.model.Model} | oModel | the model |
{String} | sPath | the path |
{Object} | oContext | the context object |
Method Detail
sap.ui.model.Context.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.ui.model.Context 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.base.Object.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.Context.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.ui.model.Context.
Returns:
{sap.ui.base.Metadata} | Metadata object describing this class |
getObject(sPath): object
Gets the (model dependent) object the context points to or the object with the given relative binding path
Parameters:
{String} | sPath | the binding path |
Returns:
{object} | the context object |