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

extends View

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

Be aware that modifications of the content aggregation of this control are not supported due to technical reasons. This includes calls to all content modifying methods like addContent> etc., but also the implicit removal of controls contained by the content aggregation. For example the destruction of a Control via the destroy method. All functions can be called but may not work properly or lead to unexpected side effects.

On root level, you can only define content for the default aggregation, e.g. without adding the <content> tag. If you want to specify content for another aggregation of a view like dependents, place it in a child control's dependents aggregation or add it by using sap.ui.core.mvc.XMLView#addDependent.

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.

stringsId?id for the new control, generated automatically if no id is given
objectmSettings?initial settings for the new control
Field Detail
Flag for feature detection of asynchronous loading/rendering
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.

stringsClassNameName of the class being created
objectoClassInfo?Object literal with information about the class
functionFNMetaImpl?Constructor function for the metadata object; if not given, it defaults to sap.ui.core.ElementMetadata
functionCreated class / constructor function
sap.ui.core.mvc.XMLView.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.ui.core.mvc.XMLView.
sap.ui.base.MetadataMetadata 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 being 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.

string|sap.ui.core.mvc.XMLView.PreprocessorTypesTypethe type of content to be processed
string|functionvPreprocessormodule path of the preprocessor implementation or a preprocessor function
booleanbSyncSupportdeclares 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.
booleanbOnDemand?ondemand preprocessor which enables developers to quickly activate the preprocessor for a view, by setting preprocessors : { xml }, for example.
objectmSettings?optional configuration for preprocessor