Abstract Class sap.ui.model.ContextModule: sap/ui/model/Context

extends Object

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
new sap.ui.model.Context(oModel, sPath, oContext)Constructor for Context class.
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.
sap.ui.model.Context.getMetadata()Returns a metadata object for class sap.ui.model.Context.
getModel()Getter for model
getObject(sPath)Gets the (model dependent) object the context points to or the object with the given relative binding path
getPath(sPath)Getter for path of the context itself or a subpath
getProperty(sPath)Gets the property 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
getModel(): sap.ui.core.Model
Getter for model
Returns:
{sap.ui.core.Model} the model
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
getPath(sPath): String
Getter for path of the context itself or a subpath
Parameters:
{String}sPath the binding path
Returns:
{String} the binding path
getProperty(sPath): any
Gets the property with the given relative binding path
Parameters:
{String}sPath the binding path
Returns:
{any} the property value