Class sap.ui.core.mvc.XMLViewModule: sap/ui/core/mvc/XMLView

extends View

A View defined using (P)XML and HTML markup.

Namespaces & Classes
PreprocessorTypeSpecifies the available preprocessor types for XMLViews
Constructor Summary
new sap.ui.core.mvc.XMLView(sId?, mSettings?)Constructor for a new mvc/XMLView.
Field Summary
sap.ui.core.mvc.XMLView.asyncSupportFlag for feature detection of asynchronous loading/rendering
Events borrowed from class sap.ui.core.Control
Method Summary
sap.ui.core.mvc.XMLView.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.ui.core.mvc.XMLView with name sClassName and enriches it with the information contained in oClassInfo.
sap.ui.core.mvc.XMLView.getMetadata()Returns a metadata object for class sap.ui.core.mvc.XMLView.
sap.ui.core.mvc.XMLView.registerPreprocessor(sType, vPreprocessor, bSyncSupport, bOnDemand?, mSettings?)Register a preprocessor for all views of a specific type.
Constructor Detail
new sap.ui.core.mvc.XMLView(sId?, mSettings?)
Constructor for a new mvc/XMLView.

Accepts an object literal mSettings that defines initial property values, aggregated and associated objects as well as event handlers. See sap.ui.base.ManagedObject for a general description of the syntax of the settings object.

This class does not have its own settings, but all settings applicable to the base type sap.ui.core.mvc.View can be used.

Parameters:
{string}sId? id for the new control, generated automatically if no id is given
{object}mSettings? initial settings for the new control
Field Detail
sap.ui.core.mvc.XMLView.asyncSupport
Flag for feature detection of asynchronous loading/rendering
Since:
1.30
Method Detail
sap.ui.core.mvc.XMLView.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.ui.core.mvc.XMLView 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.core.mvc.View.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.core.mvc.XMLView.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.ui.core.mvc.XMLView.
Returns:
{sap.ui.base.Metadata} Metadata object describing this class
sap.ui.core.mvc.XMLView.registerPreprocessor(sType, vPreprocessor, bSyncSupport, bOnDemand?, mSettings?)
Register a preprocessor for all views of a specific type.

The preprocessor can be registered for several stages of view initialization, for xml views these are either the plain "xml" or the already initialized "controls" , see sap.ui.core.mvc.XMLView.PreprocessorType. For each type one preprocessor is executed. If there is a preprocessor passed to or activated at the view instance already, that one is used. When several preprocessors are registered for one hook, it has to be made sure, that they do not conflict when beeing processed serially.

It can be either a module name as string of an implementation of sap.ui.core.mvc.View.Preprocessor or a function with a signature according to sap.ui.core.mvc.View.Preprocessor.process.

Note: Preprocessors work only in async views and will be ignored when the view is instantiated in sync mode by default, as this could have unexpected side effects. You may override this behaviour by setting the bSyncSupport flag to true.

Parameters:
{string|sap.ui.core.mvc.XMLView.PreprocessorType}sType the type of content to be processed
{string|function}vPreprocessor module path of the preprocessor implementation or a preprocessor function
{boolean}bSyncSupport declares if the vPreprocessor ensures safe sync processing. This means the preprocessor will be executed also for sync views. Please be aware that any kind of async processing (like Promises, XHR, etc) may break the view initialization and lead to unexpected results.
{boolean}bOnDemand? ondemand preprocessor which enables developers to quickly activate the preprocessor for a view, by setting preprocessors : { xml }, for example.
{object}mSettings? optional configuration for preprocessor