Class sap.ui.model.xml.XMLModelModule: sap/ui/model/xml/XMLModel
Model implementation for XML format
Constructor Summary
Events borrowed from class sap.ui.model.Model
Method Summary
sap.ui.model.xml.XMLModel.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.ui.model.xml.XMLModel with name
sClassName
and enriches it with the information contained in oClassInfo
.sap.ui.model.xml.XMLModel.getMetadata()Returns a metadata object for class sap.ui.model.xml.XMLModel.
loadData(sURL, oParameters?, bAsync?, sType?, bCache?, mHeaders)Load XML-encoded data from the server using a GET HTTP request and store the resulting XML data in the model.
setProperty(sPath, oValue, oContext?, bAsyncUpdate?)Sets a new value for the given property
sPropertyName
in the model.Methods borrowed from class sap.ui.model.ClientModel
Methods borrowed from class sap.ui.model.Model
attachParseError, attachRequestCompleted, attachRequestFailed, attachRequestSent, detachParseError, detachRequestCompleted, detachRequestFailed, detachRequestSent, fireParseError, fireRequestCompleted, fireRequestFailed, fireRequestSent, getDefaultBindingMode, getMessagesByPath, getMetaModel, getOriginalProperty, isBindingModeSupported, isLegacySyntax, refresh, setDefaultBindingMode, setLegacySyntax, setMessages, setSizeLimit
Methods borrowed from class sap.ui.core.message.MessageProcessor
Methods borrowed from class sap.ui.base.EventProvider
Methods borrowed from class sap.ui.base.Object
Constructor Detail
Method Detail
sap.ui.model.xml.XMLModel.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.ui.model.xml.XMLModel 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.ClientModel.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.xml.XMLModel.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.ui.model.xml.XMLModel.
Returns:
{sap.ui.base.Metadata} | Metadata object describing this class |
getObject(sPath, oContext?)
Returns the object for the given
path
Parameters:
{string} | sPath | the path to the object |
{object} | oContext? | the context which will be used to retrieve the object |
getProperty(sPath, oContext?)
Returns the value for the property with the given
sPropertyName
Parameters:
{string} | sPath | the path to the property |
{object} | oContext? | the context which will be used to retrieve the property |
loadData(sURL, oParameters?, bAsync?, sType?, bCache?, mHeaders)
Load XML-encoded data from the server using a GET HTTP request and store the resulting XML data in the model. Note: Due to browser security restrictions, most "Ajax" requests are subject to the same origin policy, the request can not successfully retrieve data from a different domain, subdomain, or protocol.
Parameters:
{string} | sURL | A string containing the URL to which the request is sent. |
{object|string} | oParameters? | A map or string that is sent to the server with the request. |
{boolean} | bAsync?, Default: true | if the request should be asynchron or not. Default is true. |
{string} | sType?, Default: GET | of request. Default is 'GET' |
{string} | bCache? | force no caching if false. Default is false |
{object} | mHeaders | An object of additional header key/value pairs to send along with the request |
setData(oData)
Sets the provided XML encoded data object to the model
Parameters:
{object} | oData | the data to set to the model |
setNameSpace(sNameSpace, sPrefix?)
Sets an XML namespace to use in the binding path
Parameters:
{string} | sNameSpace | the namespace URI |
{string} | sPrefix? | the prefix for the namespace (optional) |
setProperty(sPath, oValue, oContext?, bAsyncUpdate?): boolean
Sets a new value for the given property
sPropertyName
in the model. If the model value changed all interested parties are informed. Parameters:
{string} | sPath | path of the property to set |
{any} | oValue | value to set the property to |
{object} | oContext? | the context which will be used to set the property |
{boolean} | bAsyncUpdate? | whether to update other bindings dependent on this property asynchronously |
Returns:
{boolean} | true if the value was set correctly and false if errors occurred like the entry was not found. |