sap.ui.core.tmpl.DOMElement.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.ui.core.tmpl.DOMElement 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.Control.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 |
Returns a metadata object for class sap.ui.core.tmpl.DOMElement.
Returns:
Adds some attribute to the aggregation attributes
.
Parameters:
Returns:
Adds some element to the aggregation elements
.
Parameters:
Returns:
attr(sName, sValue): any
Returns the value of a DOM attribute if available or undefined if the DOM attribute is not available when using this method with the parameter name only. When using the method with the parameter name and value the method acts as a setter and sets the value of a DOM attribute. In this case the return value is the reference to this DOM element to support method chaining. If you pass null as value of the attribute the attribute will be removed.
Parameters:
{string} | sName | The name of the DOM attribute. |
{string} | sValue | The value of the DOM attribute. If the value is undefined the DOM attribute will be removed. |
Returns:
{any} | value of attribute or this when called as a setter |
Destroys all the attributes in the aggregation attributes
.
Returns:
Destroys all the elements in the aggregation elements
.
Returns:
Gets content of aggregation
attributes
.
DOM attributes which are rendered as part of the DOM element and bindable
Returns:
Gets content of aggregation
elements
.
Nested DOM elements to support nested bindable structures
Returns:
getTag(): string
Gets current value of property
tag
.
The HTML-tag of the DOM element which contains the text
Default value is span
.
Returns:
{string} | Value of property tag |
getText(): string
Gets current value of property
text
.
The text content of the DOM element
Returns:
{string} | Value of property text |
indexOfAttribute(oAttribute): int
Checks for the provided sap.ui.core.tmpl.DOMAttribute
in the aggregation attributes
. and returns its index if found or -1 otherwise.
Parameters:
Returns:
{int} | The index of the provided control in the aggregation if found, or -1 otherwise |
indexOfElement(oElement): int
Checks for the provided sap.ui.core.tmpl.DOMElement
in the aggregation elements
. and returns its index if found or -1 otherwise.
Parameters:
Returns:
{int} | The index of the provided control in the aggregation if found, or -1 otherwise |
Inserts a attribute into the aggregation attributes
.
Parameters:
{sap.ui.core.tmpl.DOMAttribute} | oAttribute | the attribute to insert; if empty, nothing is inserted |
{int} | iIndex | the 0 -based index the attribute should be inserted at; for a negative value of iIndex , the attribute is inserted at position 0; for a value greater than the current size of the aggregation, the attribute is inserted at the last position |
Returns:
Inserts a element into the aggregation elements
.
Parameters:
{sap.ui.core.tmpl.DOMElement} | oElement | the element to insert; if empty, nothing is inserted |
{int} | iIndex | the 0 -based index the element should be inserted at; for a negative value of iIndex , the element is inserted at position 0; for a value greater than the current size of the aggregation, the element is inserted at the last position |
Returns:
Removes all the controls from the aggregation
attributes
.
Additionally, it unregisters them from the hosting UIArea.
Returns:
Removes all the controls from the aggregation
elements
.
Additionally, it unregisters them from the hosting UIArea.
Returns:
Removes the DOM attribute for the given name and returns the reference to this DOM element to support method chaining.
Parameters:
{string} | sName | The name of the DOM attribute. |
Returns:
Removes a attribute from the aggregation attributes
.
Parameters:
Returns:
Removes a element from the aggregation elements
.
Parameters:
Returns:
Sets a new value for property
tag
.
The HTML-tag of the DOM element which contains the text
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is span
.
Parameters:
{string} | sTag | New value for property tag |
Returns:
Sets a new value for property
text
.
The text content of the DOM element
When called with a value of null
or undefined
, the default value of the property will be restored.
Parameters:
{string} | sText | New value for property text |
Returns: