Class sap.ui.core.ElementModule: sap/ui/core/Element

known direct subclasses: AccordionSection, Adapter3D, AnalysisObject, Area, Axis, BaseStructuredType, BorderLayoutArea, BulletChartData, BulletMicroChartData, CalendarLegendItem, Category, ChartScheme, ClusterBase, Collection, Column, Column, Column, ColumnAttribute, ColumnData, ColumnMicroChartLabel, ComparisonData, ComparisonMicroChartData, Configuration, ContainerLayout, Control, ControlConfiguration, ControlProposal, CustomData, DOMAttribute, DataSetItem, Dataset, DateRange, DefBase, Dimension, DimensionDefinition, DragSource, DropTarget, ExactAttribute, ExpandChart, ExportCell, Feature, FeedItem, FeedItem, FileUploaderParameter, FilterItem, FormContainer, FormElement, GanttChartLayout, GeoJsonLayer, GroupConfiguration, HarveyBallMicroChartItem, HeaderCellItem, Hierarchy, HierarchyColumn, IconTabSeparator, Item, Layer, Layout, LayoutData, Legend, LegendItem, LinkData, Locale, MakitLib, MaskInputRule, MatrixLayoutCell, MatrixLayoutRow, Measure, MeasureDefinition, MenuItemBase, Message, MessagePopoverItem, MicroAreaChartItem, MicroAreaChartLabel, MicroAreaChartPoint, Mode, ModelMapping, Notifier, ObjectStatus, ObjectType, OverlapCalendarEvent, OverlayArea, PageAccessibleLandmarkInfo, PaneContainer, PersonalizableInfo, PieItem, PlanningCalendarRow, PlanningCalendarView, PositionContainer, QuickViewGroup, QuickViewGroupElement, Region, Resource, RoadMapStep, Row, Row, RowRepeaterFilter, RowRepeaterSorter, SearchProvider, SelectOption, SemanticControl, SemanticObjectController, Series, SettingItem, Shape, ShellHeadItem, ShellHeadUserItem, SplitPane, TabContainerItem, TargetFilterColumn, TargetFilterMeasureColumn, ThingAction, ThingGroup, TimeAxis, TimeHorizon, Title, ToolbarGroup, ToolbarScheme, ToolbarSeparator, TreeNode, UploadCollectionItem, UploadCollectionParameter, Value, ValueBubble, VoAbstract, VoBase

Base Class for Elements.

Constructor Summary
new sap.ui.core.Element(sId?, mSettings?)Constructs and initializes an UI Element with the given sId and settings.
Method Summary
sap.ui.core.Element.create(vData, oKeyInfo?)Creates a new Element from the given data.
sap.ui.core.Element.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.ui.core.Element with name sClassName and enriches it with the information contained in oClassInfo.
sap.ui.core.Element.getMetadata()Returns a metadata object for class sap.ui.core.Element.
$(sSuffix?)Returns the best suitable DOM node that represents this Element wrapped as jQuery object.
addCustomData(oCustomData)Adds some customData to the aggregation customData.
addDependent(oDependent)Adds some dependent to the aggregation dependents.
addEventDelegate(oDelegate, oThis?)Adds a delegate that listens to the events that are fired on this element (as opposed to events which are fired BY this element).
applyFocusInfo(oFocusInfo)Applies the focus info.
bindElement(vPath, mParameters?)Bind the object to the referenced entity in the model, which is used as the binding context to resolve bound properties or aggregations of the object itself and all of its children relatively to the given path.
clone(sIdSuffix?, aLocalIds?)Clone delegates
data()Attaches custom data to an Element or retrieves attached data.
destroy(bSuppressInvalidate?)Cleans up the resources associated with this element and all its children.
destroyCustomData()Destroys all the customData in the aggregation customData.
destroyDependents()Destroys all the dependents in the aggregation dependents.
destroyLayoutData()Destroys the layoutData in the aggregation layoutData.
destroyTooltip()Destroys the tooltip in the aggregation named tooltip.
enhanceAccessibilityState(oElement, mAriaProps)Allows the parent of a control to enhance the aria information during rendering.
exit()Cleans up the element instance before destruction.
findElements(bRecursive)Searches and returns an array of child elements and controls which are referenced within an aggregation or aggregations of child elements/controls.
fireEvent(sEventId, mParameters)Fires the given event and notifies all listeners.
focus()Sets the focus to the stored focus DOM reference
getCustomData()Gets content of aggregation customData.
getDependents()Gets content of aggregation dependents.
getDomRef(sSuffix?)Returns the best suitable DOM Element that represents this UI5 Element.
getElementBinding(sModelName)Get the element binding object for a specific model
getFocusDomRef()Returns the DOM Element that should get the focus.
getFocusInfo()Returns an object representing the serialized focus information To be overwritten by the specific control method
getLayoutData()Gets content of aggregation layoutData.
getMetadata()Returns the runtime metadata for this UI element.
getTooltip()Returns the tooltip for this element if any or an undefined value.
getTooltip_AsString()Returns the tooltip for this element but only if it is a simple string.
getTooltip_Text()Returns the main text for the current tooltip or undefined if there is no such text.
indexOfCustomData(oCustomData)Checks for the provided sap.ui.core.CustomData in the aggregation customData.
indexOfDependent(oDependent)Checks for the provided sap.ui.core.Element in the aggregation dependents.
init()Initializes the element instance after creation.
insertCustomData(oCustomData, iIndex)Inserts a customData into the aggregation customData.
insertDependent(oDependent, iIndex)Inserts a dependent into the aggregation dependents.
removeAllCustomData()Removes all the controls from the aggregation customData.
removeAllDependents()Removes all the controls from the aggregation dependents.
removeCustomData(vCustomData)Removes a customData from the aggregation customData.
removeDependent(vDependent)Removes a dependent from the aggregation dependents.
removeEventDelegate(oDelegate)Removes the given delegate from this element.
rerender()This triggers immediate rerendering of its parent and thus of itself and its children.
setLayoutData(oLayoutData)Sets the sap.ui.core.LayoutData defining the layout constraints for this control when it is used inside a layout.
setTooltip(vTooltip)Sets a new tooltip for this object.
toString()Returns a simple string representation of this element.
unbindElement(sModelName)Removes the defined binding context of this object, all bindings will now resolve relative to the parent context again.
sap.ui.core.Element.defineClass(sClassName, oStaticInfo, fnMetaImpl?)Creates metadata for an UI Element by extending the Object Metadata.
prop(sPropertyName, oValue?)This function either calls set[sPropertyName] or get[sPropertyName] with the specified property name depending if an oValue is provided or not.
Constructor Detail
new sap.ui.core.Element(sId?, mSettings?)
Constructs and initializes an UI Element with the given sId and settings.

If the optional mSettings are given, they must be a JSON-like object (object literal) that defines values for properties, aggregations, associations or events keyed by their name.

Valid Names:

The property (key) names supported in the object literal are exactly the (case sensitive) names documented in the JSDoc for the properties, aggregations, associations and events of the control and its base classes. Note that for 0..n aggregations and associations this usually is the plural name, whereas it is the singular name in case of 0..1 relations.

If a key name is ambiguous for a specific control class (e.g. a property has the same name as an event), then this method prefers property, aggregation, association and event in that order. To resolve such ambiguities, the keys can be prefixed with aggregation:, association: or event:. In that case the keys must be quoted due to the ':'.

Each subclass should document the set of supported names in its constructor documentation.

Valid Values:

  • for normal properties, the value has to be of the correct simple type (no type conversion occurs)
  • for 0..1 aggregations, the value has to be an instance of the aggregated control or element type
  • for 0..n aggregations, the value has to be an array of instances of the aggregated type
  • for 0..1 associations, an instance of the associated type or an id (string) is accepted
  • 0..n associations are not supported yet
  • for events either a function (event handler) is accepted or an array of length 2 where the first element is a function and the 2nd element is an object to invoke the method on.

Special aggregation dependents is connected to the lifecycle management and databinding, but not rendered automatically and can be used for popups or other dependent controls or elements. This allows the definition of popup controls in declarative views and enables propagation of model and context information to them.

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.

The supported settings are:

In addition, all settings applicable to the base type sap.ui.base.ManagedObject can be used as well.

Parameters:
{string}sId? id for the new control; generated automatically if no non-empty id is given Note: this can be omitted, no matter whether mSettings will be given or not!
{object}mSettings? optional map/JSON-object with initial property values, aggregated objects etc. for the new element
Method Detail
sap.ui.core.Element.create(vData, oKeyInfo?)
Creates a new Element from the given data.

If vData is an Element already, that element is returned. If vData is an object (literal), then a new element is created with vData as settings. The type of the element is either determined by a "Type" entry in the vData or by a type information in the oKeyInfo object

Parameters:
{sap.ui.core.Element|object}vData the data to create the element from
{object}oKeyInfo? an entity information (e.g. aggregation info)
{string}oKeyInfo.type? type info for the entity
sap.ui.core.Element.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.ui.core.Element with name sClassName and enriches it with the information contained in oClassInfo.

oClassInfo might contain the following:

  • metadata: an (optional) object literal containing meta information about the class. The information in the object literal will be wrapped by an instance of ElementMetadata and might contain the following information:
    • all values accepted for metadata as documented for the Object.extend method
    • library: {string} (optional) name of the library that contains the element/control
    • properties: a map of property info objects, mapped by the property name Each info object should be a simple object literal and may contain the following information
      • type {string} optional type of the property, defaults to type "string"
      • [defaultValue] {any} default value of the property. When omitted, defaults to the default value for the type
      • group {string} optional semantic group of the property. Defaults to "Misc"
      If the property info object is not an object literal, it is assumed to be a string and interpreted as the type of the property. All other informations use their default values.
    • aggregations: a map of aggregation info objects, mapped by the aggregation name By convention, the name should be a singular name for aggregations of cardinality 0..1 and should be a plural name for aggregations of cardinality 0..n.

      The info object should contain the following information

      • type {string} (optional) type of the aggregated controls/elements, defaults to sap.ui.core.Control
      • altTypes {string[]} (optional) alternative primitive types that the aggregation can have (like string etc.). Defaults to no alternative types.
      • multiple {boolean} (optional) information about the cardinality, defaults to true (multiple aggregation)
      • singularName {string} (optional) singular name for 0..n aggregations. If not specified, a singular name is guessed from the plural name.
      If the aggregation info object is not an object literal, it is assumed to be a string and interpreted as the type of the aggregation. All other informations use their default values.
    • associations: a map of association info objects, mapped by the association name By convention, the name should be a singular name for aggregations of cardinality 0..1 and should be a plural name for aggregations of cardinality 0..n.

      The info object should contain the following information

      • type {string} type of the associated controls/elements, defaults to sap.ui.core.Control
      • multiple {boolean} (optional) information about the cardinality, defaults to false (single aggregation)
      • singularName {string} (optional) singular name for 0..n aggregations. If not specified, a singular name is guessed from the plural name.
      If the association info object is not an object literal, it is assumed to be a string and interpreted as the type of the aggregation. All other informations then use their default values.
    • events: a map of event info objects, mapped by the event name The info object can contain the following information
      • allowPreventDefault: {boolean} whether the control allows to prevent its default behavior for this event (defaults to false)
    For all properties, aggregations, associations and events, the usual access methods are created and added to the public facade. They don't need to be listed in the publicMethods array.
  • constructor: a function that serves as a constructor function for the new element class. If no constructor function is given, the framework creates a default implementation that delegates all its arguments to the constructor function of the base class. Note: most of the time, subclasses of Element don't need to specify their own constructor function. They should use the symmetric init and exit hooks instead.
  • renderer: definition of a renderer. This can be any of the following
    • the class name of a renderer class (a string)
    • a render function with signature function(oRenderManager, oControl) that implements the rendering for the new class
    • an object literal that contains functions/properties that should be mixed into a new render class which is created as a subclass of the renderer of the current class.
    Note: usually only controls have a renderer. But to keep the control creation APIs simple and to honor future extensions of the current policy, the definition of a renderer is supported for direct subclasses of Element as well.
  • any-other-name: any other property in the oClassInfo is copied into the prototype object of the newly created class. Callers can thereby add methods or properties to all instances of the class. But be aware that the given values are shared between all instances of the class. Usually, it doesn't make sense to use primitive values here other than to declare public constants.

    All methods added this way and whose name is not 'init' nor 'exit' nor does it start with an underscore ('_') nor with the prefix 'on' are assumed to be public methods and are automatically added to the list of public facade methods.

The prototype object of the newly created class uses the same prototype as instances of the base class (prototype chaining).

A metadata object is always created, even if there is no metadata entry in the oClassInfo object. A getter for the metadata is always attached to the prototype and to the class (constructor function) itself.

Last but not least, with the third argument FNMetaImpl the constructor of a metadata class can be specified. Instances of that class will be used to represent metadata for the newly created class and for any subclass created from it. Typically, only frameworks will use this parameter to enrich the metadata for a new class hierarchy they introduce (as done by Element).

Parameters:
{string}sClassName name of the class to be created
{object}oClassInfo? structured object with informations about the class
{function}FNMetaImpl? constructor function for the metadata object. If not given, it defaults to sap.ui.core.ElementMetadata.
Since:
1.3.1
Returns:
{function} the created class / constructor function
sap.ui.core.Element.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.ui.core.Element.
Returns:
{sap.ui.base.Metadata} Metadata object describing this class
$(sSuffix?): jQuery
Returns the best suitable DOM node that represents this Element wrapped as jQuery object. I.e. the element returned by sap.ui.core.Element#getDomRef is wrapped and returned.

If an ID suffix is given, the ID of this Element is concatenated with the suffix (separated by a single dash) and the DOM node with that compound ID will be wrapped by jQuery. This matches the UI5 naming convention for named inner DOM nodes of a control.

Parameters:
{string}sSuffix? ID suffix to get a jQuery object for
Returns:
{jQuery} The jQuery wrapped element's DOM reference
addCustomData(oCustomData): sap.ui.core.Element
Adds some customData to the aggregation customData.
Parameters:
{sap.ui.core.CustomData}oCustomData the customData to add; if empty, nothing is inserted
Returns:
{sap.ui.core.Element} Reference to this in order to allow method chaining
addDependent(oDependent): sap.ui.core.Element
Adds some dependent to the aggregation dependents.
Parameters:
{sap.ui.core.Element}oDependent the dependent to add; if empty, nothing is inserted
Since:
1.19
Returns:
{sap.ui.core.Element} Reference to this in order to allow method chaining
addEventDelegate(oDelegate, oThis?): sap.ui.core.Element
Adds a delegate that listens to the events that are fired on this element (as opposed to events which are fired BY this element).

When this element is cloned, the same delegate will be added to all clones. This behavior is well-suited for applications which want to add delegates that also work with templates in aggregation bindings. For control development the internal "addDelegate" method which does not clone delegates by default may be more suitable, as typically each control instance takes care of its own delegates.

To avoid double registrations, all registrations of the given delegate are first removed and then the delegate is added.

Important: If event delegates were added the delegate will still be called even if the event was processed and/or cancelled via preventDefault by the Element or another event delegate. preventDefault only prevents the event from bubbling. It should be checked e.g. in the event delegate's listener whether an Element is still enabled via getEnabled. Additionally there might be other things that delegates need to check depending on the event (e.g. not adding a key twice to an output string etc.).

Parameters:
{object}oDelegate the delegate object
{object}oThis? if given, this object will be the "this" context in the listener methods; default is the delegate object itself
Since:
1.9.0
Returns:
{sap.ui.core.Element} Returns this to allow method chaining
applyFocusInfo(oFocusInfo)
Applies the focus info.

To be overwritten by the specific control method.

Parameters:
{object}oFocusInfo
bindElement(vPath, mParameters?): sap.ui.base.ManagedObject
Bind the object to the referenced entity in the model, which is used as the binding context to resolve bound properties or aggregations of the object itself and all of its children relatively to the given path. If a relative binding path is used, this will be applied whenever the parent context changes.
Parameters:
{string|object}vPath the binding path or an object with more detailed binding options
{string}vPath.path the binding path
{object}vPath.parameters? map of additional parameters for this binding
{string}vPath.model? name of the model
{object}vPath.events? map of event listeners for the binding events
{object}mParameters? map of additional parameters for this binding (only taken into account when vPath is a string in that case the properties described for vPath above are valid here).
Returns:
{sap.ui.base.ManagedObject} reference to the instance itself
clone(sIdSuffix?, aLocalIds?): sap.ui.base.ManagedObject
Clone delegates
Parameters:
{string}sIdSuffix? a suffix to be appended to the cloned element id
{string[]}aLocalIds? an array of local IDs within the cloned hierarchy (internally used)
Returns:
{sap.ui.base.ManagedObject} reference to the newly created clone
data()
Attaches custom data to an Element or retrieves attached data.

Usage: data("myKey", myData) attaches myData (which can be any JS data type, e.g. a number, a string, an object, or a function) to this element, under the given key "myKey". If the key already exists,the value will be updated.

data("myKey", myData, writeToDom) attaches myData to this element, under the given key "myKey" and (if writeToDom is true) writes key and value to the HTML. If the key already exists,the value will be updated. While oValue can be any JS data type to be attached, it must be a string to be also written to DOM. The key must also be a valid HTML attribute name (it must conform to sap.ui.core.ID and may contain no colon) and may not start with "sap-ui". When written to HTML, the key is prefixed with "data-".

data("myKey") retrieves whatever data has been attached to this Element (using the key "myKey") before

data("myKey", null) removes whatever data has been attached to this Element (using the key "myKey") before

data(null) removes all data

data() returns all data, as a map

destroy(bSuppressInvalidate?)
Cleans up the resources associated with this element and all its children.

After an element has been destroyed, it can no longer be used in the UI!

Applications should call this method if they don't need the element any longer.

Parameters:
{boolean}bSuppressInvalidate? if true, the UI element is not marked for redraw
destroyCustomData(): sap.ui.core.Element
Destroys all the customData in the aggregation customData.
Returns:
{sap.ui.core.Element} Reference to this in order to allow method chaining
destroyDependents(): sap.ui.core.Element
Destroys all the dependents in the aggregation dependents.
Since:
1.19
Returns:
{sap.ui.core.Element} Reference to this in order to allow method chaining
destroyLayoutData(): sap.ui.core.Element
Destroys the layoutData in the aggregation layoutData.
Returns:
{sap.ui.core.Element} Reference to this in order to allow method chaining
destroyTooltip(): sap.ui.core.Element
Destroys the tooltip in the aggregation named tooltip.
Returns:
{sap.ui.core.Element}this to allow method chaining
enhanceAccessibilityState(oElement, mAriaProps): object
Allows the parent of a control to enhance the aria information during rendering.

This function is called by the RenderManager's writeAccessibilityState method for the parent of the currently rendered control - if the parent implements it.

Parameters:
{sap.ui.core.Element}oElement the Control/Element for which aria properties are rendered
{object}mAriaProps map of aria properties keyed by there name (withour prefix "aria-")
Returns:
{object} map of enhanced aria properties
exit()
Cleans up the element instance before destruction.

Applications must not call this hook method directly, it is called by the framework when the element is destroyed.

Subclasses of Element should override this hook to implement any necessary cleanup.

findElements(bRecursive): sap.ui.core.Element[]
Searches and returns an array of child elements and controls which are referenced within an aggregation or aggregations of child elements/controls. This can be either done recursive or not.
Take care: this operation might be expensive.
Parameters:
{boolean}bRecursive true, if all nested children should be returned.
Returns:
{sap.ui.core.Element[]} array of child elements and controls
fireEvent(sEventId, mParameters): sap.ui.core.Element
Fires the given event and notifies all listeners. Listeners must not change the content of the event.
Parameters:
{string}sEventId the event id
{object}mParameters the parameter map
Returns:
{sap.ui.core.Element} Returns this to allow method chaining
focus()
Sets the focus to the stored focus DOM reference
getCustomData(): sap.ui.core.CustomData[]
Gets content of aggregation customData.

Custom Data, a data structure like a map containing arbitrary key value pairs.

Returns:
{sap.ui.core.CustomData[]}
getDependents(): sap.ui.core.Element[]
Gets content of aggregation dependents.

Dependents are not rendered, but their databinding context and lifecycle are bound to the aggregating Element.

Since:
1.19
Returns:
{sap.ui.core.Element[]}
getDomRef(sSuffix?): Element
Returns the best suitable DOM Element that represents this UI5 Element. By default the DOM Element with the same ID as this Element is returned. Subclasses should override this method if the lookup via id is not sufficient.

Note that such a DOM Element does not necessarily exist in all cases. Some elements or controls might not have a DOM representation at all (e.g. a naive FlowLayout) while others might not have one due to their current state (e.g. an initial, not yet rendered control).

If an ID suffix is given, the ID of this Element is concatenated with the suffix (separated by a single dash) and the DOM node with that compound ID will be returned. This matches the UI5 naming convention for named inner DOM nodes of a control.

Parameters:
{string}sSuffix? ID suffix to get the DOMRef for
Returns:
{Element} The Element's DOM Element sub DOM Element or null
getElementBinding(sModelName): sap.ui.model.Binding
Get the element binding object for a specific model
Parameters:
{string}sModelName the name of the model
Returns:
{sap.ui.model.Binding} the element binding for the given model name
getFocusDomRef(): Element
Returns the DOM Element that should get the focus.

To be overwritten by the specific control method.

Returns:
{Element} Returns the DOM Element that should get the focus
getFocusInfo()
Returns an object representing the serialized focus information To be overwritten by the specific control method
getLayoutData(): sap.ui.core.LayoutData
Gets content of aggregation layoutData.

Defines the layout constraints for this control when it is used inside a Layout. LayoutData classes are typed classes and must match the embedding Layout. See VariantLayoutData for aggregating multiple alternative LayoutData instances to a single Element.

Returns:
{sap.ui.core.LayoutData}
getMetadata(): object
Returns the runtime metadata for this UI element.

When using the defineClass method, this function is automatically created and returns a runtime representation of the design time metadata.

Returns:
{object} runtime metadata
getTooltip(): string|sap.ui.core.TooltipBase
Returns the tooltip for this element if any or an undefined value. The tooltip can either be a simple string or a subclass of sap.ui.core.TooltipBase.

Callers that are only interested in tooltips of type string (e.g. to render them as a title attribute), should call the convenience method getTooltip_AsString instead. If they want to get a tooltip text no matter where it comes from (be it a string tooltip or the text from a TooltipBase instance) then they could call getTooltip_Text instead.

Returns:
{string|sap.ui.core.TooltipBase} The tooltip for this Element.
getTooltip_AsString(): string
Returns the tooltip for this element but only if it is a simple string. Otherwise an undefined value is returned.
Returns:
{string} string tooltip or undefined
getTooltip_Text(): string
Returns the main text for the current tooltip or undefined if there is no such text. If the tooltip is an object derived from sap.ui.core.Tooltip, then the text property of that object is returned. Otherwise the object itself is returned (either a string or undefined or null).
Returns:
{string} text of the current tooltip or undefined
indexOfCustomData(oCustomData): int
Checks for the provided sap.ui.core.CustomData in the aggregation customData. and returns its index if found or -1 otherwise.
Parameters:
{sap.ui.core.CustomData}oCustomData The customData whose index is looked for
Returns:
{int} The index of the provided control in the aggregation if found, or -1 otherwise
indexOfDependent(oDependent): int
Checks for the provided sap.ui.core.Element in the aggregation dependents. and returns its index if found or -1 otherwise.
Parameters:
{sap.ui.core.Element}oDependent The dependent whose index is looked for
Since:
1.19
Returns:
{int} The index of the provided control in the aggregation if found, or -1 otherwise
init()
Initializes the element instance after creation.

Applications must not call this hook method directly, it is called by the framework while the constructor of an element is executed.

Subclasses of Element should override this hook to implement any necessary initialization.

insertCustomData(oCustomData, iIndex): sap.ui.core.Element
Inserts a customData into the aggregation customData.
Parameters:
{sap.ui.core.CustomData}oCustomData the customData to insert; if empty, nothing is inserted
{int}iIndex the 0-based index the customData should be inserted at; for a negative value of iIndex, the customData is inserted at position 0; for a value greater than the current size of the aggregation, the customData is inserted at the last position
Returns:
{sap.ui.core.Element} Reference to this in order to allow method chaining
insertDependent(oDependent, iIndex): sap.ui.core.Element
Inserts a dependent into the aggregation dependents.
Parameters:
{sap.ui.core.Element}oDependent the dependent to insert; if empty, nothing is inserted
{int}iIndex the 0-based index the dependent should be inserted at; for a negative value of iIndex, the dependent is inserted at position 0; for a value greater than the current size of the aggregation, the dependent is inserted at the last position
Since:
1.19
Returns:
{sap.ui.core.Element} Reference to this in order to allow method chaining
removeAllCustomData(): sap.ui.core.CustomData[]
Removes all the controls from the aggregation customData.

Additionally, it unregisters them from the hosting UIArea.

Returns:
{sap.ui.core.CustomData[]} An array of the removed elements (might be empty)
removeAllDependents(): sap.ui.core.Element[]
Removes all the controls from the aggregation dependents.

Additionally, it unregisters them from the hosting UIArea.

Since:
1.19
Returns:
{sap.ui.core.Element[]} An array of the removed elements (might be empty)
removeCustomData(vCustomData): sap.ui.core.CustomData
Removes a customData from the aggregation customData.
Parameters:
{int|string|sap.ui.core.CustomData}vCustomData The customDatato remove or its index or id
Returns:
{sap.ui.core.CustomData} The removed customData or null
removeDependent(vDependent): sap.ui.core.Element
Removes a dependent from the aggregation dependents.
Parameters:
{int|string|sap.ui.core.Element}vDependent The dependentto remove or its index or id
Since:
1.19
Returns:
{sap.ui.core.Element} The removed dependent or null
removeEventDelegate(oDelegate): sap.ui.core.Element
Removes the given delegate from this element.

This method will remove all registrations of the given delegate, not only one.

Parameters:
{object}oDelegate the delegate object
Since:
1.9.0
Returns:
{sap.ui.core.Element} Returns this to allow method chaining
rerender()
This triggers immediate rerendering of its parent and thus of itself and its children.
As sap.ui.core.Element "bubbles up" the rerender, changes to child-Elements will also result in immediate rerendering of the whole sub tree.
setLayoutData(oLayoutData)
Sets the sap.ui.core.LayoutData defining the layout constraints for this control when it is used inside a layout.
Parameters:
{sap.ui.core.LayoutData}oLayoutData
setTooltip(vTooltip)
Sets a new tooltip for this object. The tooltip can either be a simple string (which in most cases will be rendered as the title attribute of this Element) or an instance of sap.ui.core.TooltipBase.

If a new tooltip is set, any previously set tooltip is deactivated.

Parameters:
{string|sap.ui.core.TooltipBase}vTooltip
toString(): string
Returns a simple string representation of this element.

Mainly useful for tracing purposes.

Returns:
{string} a string descripition of this element
unbindElement(sModelName): sap.ui.base.ManagedObject
Removes the defined binding context of this object, all bindings will now resolve relative to the parent context again.
Parameters:
{string}sModelName
Returns:
{sap.ui.base.ManagedObject} reference to the instance itself
sap.ui.core.Element.defineClass(sClassName, oStaticInfo, fnMetaImpl?): object
Creates metadata for an UI Element by extending the Object Metadata.

In addition to the entries defined by sap.ui.base.Object.defineClass, the following entries can be specified in the static info object:

  • library: {string} name of the library that contains the element/control
  • properties: a map of property info objects, mapped by the property name Info object should contain the following information
    • name {string} name of the property (redundant to map key)
    • type {string} type of the property
    • [defaultValue] {any} default value of the property. Can be omitted
  • aggregations: a map of aggregation info objects, mapped by the aggregation name Info object should contain the following information
    • name {string} name of the aggregation, singular for 0..1, plural for 0..n
    • type {string} type of the aggregated controls/elements
    • multiple {boolean}
    • singularName {string} singular name for 0..n aggregations
  • associations: a map of association info objects, mapped by the association name Info object should contain the following information
    • name {string} name of the association, singular for 0..1, plural for 0..n
    • type {string} type of the associated controls/elements
    • multiple {boolean}
    • singularName {string} singular name for 0..n associations
  • events: map from event names to event names
Parameters:
{string}sClassName name of the class to build the metadata for
{object}oStaticInfo static information used to build the metadata
{function}fnMetaImpl? constructor to be used for the metadata
Deprecated:
Since 1.3.1. Use the static extend method of the desired base class (e.g. sap.ui.core.Element.extend)
Returns:
{object} the created metadata
See:
sap.ui.base.Object.defineClass
prop(sPropertyName, oValue?): any|sap.ui.core.Element
This function either calls set[sPropertyName] or get[sPropertyName] with the specified property name depending if an oValue is provided or not.
Parameters:
{string}sPropertyName name of the property to set
{any}oValue? value to set the property to
Deprecated:
Since 1.28.0 The contract of this method is not fully defined and its write capabilities overlap with applySettings
Returns:
{any|sap.ui.core.Element} Returns this to allow method chaining in case of setter and the property value in case of getter