Class sap.ui2.etc.DataContext
Defined in: DataContextAPI.js.
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
DataContext
This class is experimental, location might change in the future do not invoke directly, use (new DataContextAPI()).getDataContext(); |
| Method Attributes | Method Name and Description |
|---|---|
|
fromObject(sObj, sNamespace)
Update the complete content(if sNamespace not provided) or the subtree under
sNamespace with the content of obj |
|
| <static> |
sap.ui2.etc.DataContext.getDataContext()
Static factory
Obtain the appropriate singleton instance (attached it window) |
|
listKeys(sNamespace)
Return a sorted list of all keys present in the namespace
|
|
|
Returns a sorted list of all present namespaces
|
|
|
read(key, namespace)
Returns the text value of a given string value pair
|
|
|
remove(key, namespace)
Deletes a key in a namespace
|
|
|
toObject(sNamespace)
Retrieve the object representing the complete context or the namespace (if
sNamespace provided)
as a copy |
|
|
toXML(sNamespace)
Return the XML of the content as a String
in a proprietary format used for ABAP-Backend exchange.
|
|
|
write(key, value, namespace)
Write value as the Returns the text value of a given string value pair
|
Class Detail
sap.ui2.etc.DataContext()
DataContext
This class is experimental, location might change in the future
do not invoke directly, use (new DataContextAPI()).getDataContext();
This class is experimental, location might change in the future
do not invoke directly, use (new DataContextAPI()).getDataContext();
- Since:
- 1.16.0
Method Detail
fromObject(sObj, sNamespace)
Update the complete content(if sNamespace not provided) or the subtree under
sNamespace with the content of obj
- Parameters:
- {Object} sObj
- the complete ( sNamespace undefined) or the sNamespace context object
- {string} sNamespace
- a namespace context as a string, e.g. "CANVAS_appData", undefined implies the whole object
<static>
{DataContext}
sap.ui2.etc.DataContext.getDataContext()
Static factory
Obtain the appropriate singleton instance (attached it window)
Obtain the appropriate singleton instance (attached it window)
- Returns:
- {DataContext}
{array[string]}
listKeys(sNamespace)
Return a sorted list of all keys present in the namespace
- Parameters:
- {string} sNamespace
- the namespace
- Returns:
- {array[string]} a sorted list of all the keys for the current namespace
{array}
listNamespaces()
Returns a sorted list of all present namespaces
- Returns:
- {array} a sorted list of all present namespaces
{string}
read(key, namespace)
Returns the text value of a given string value pair
- Parameters:
- {string} key
- {string} namespace Optional
- defaults to "__global__" if not specified
- Returns:
- {string} the value of the present namespace, or null
remove(key, namespace)
Deletes a key in a namespace
- Parameters:
- {string} key
- the key of the value to remove
- {string} namespace Optional
- the namespace , defaults to "__global__"
{object}
toObject(sNamespace)
Retrieve the object representing the complete context or the namespace (if
sNamespace provided)
as a copy
- Parameters:
- {string} sNamespace Optional
- an optional namespace
- Returns:
- {object} context representation
{string}
toXML(sNamespace)
Return the XML of the content as a String
in a proprietary format used for ABAP-Backend exchange.
- Parameters:
- {string} sNamespace
- a namespace, undefined = full context
- Returns:
- {string} the content as an xml string
write(key, value, namespace)
Write value as the Returns the text value of a given string value pair
- Parameters:
- {string} key
- {string} value
- {string} namespace Optional
- the namespace "__global__" if not specified