The FormattedTextView control allows the usage of a limited set of HTML tags for display.
Constructor for a new FormattedTextView.
Accepts an object literal mSettings
that defines initial property values, aggregated and associated objects as well as event handlers. See sap.ui.base.ManagedObject#constructor for a general description of the syntax of the settings object.
new sap.ui.commons.FormattedTextView(sId?, mSettings?)
Param | Type | Default Value | Description |
---|---|---|---|
sId? | string | ID for the new control, generated automatically if no ID is given |
|
mSettings? | object | Initial settings for the new control |
Name | Type | Default Value | Description |
---|---|---|---|
accessibleRole | sap.ui.core.AccessibleRole | Document | The ARIA role for the control. Visibility: public |
htmlText | string | empty string | Determines text with placeholders. Visibility: public |
Default Aggregation:
Name | Cardinality | Type | Description |
---|---|---|---|
controls | 0..n | sap.ui.core.Control |
Array of controls that should be replaced within htmlText. |
Method | Description |
---|---|
addControl |
Adds some control to the aggregation controls. |
destroyControls |
Destroys all the controls in the aggregation controls. |
sap.ui.commons.FormattedTextView.extend |
Creates a new subclass of class sap.ui.commons.FormattedTextView with name
|
getAccessibleRole |
Gets current value of property accessibleRole. The ARIA role for the control. Default value is |
getControls |
Gets content of aggregation controls. Array of controls that should be replaced within htmlText. |
getHtmlText |
Gets current value of property htmlText. Determines text with placeholders. Default value is |
sap.ui.commons.FormattedTextView.getMetadata |
Returns a metadata object for class sap.ui.commons.FormattedTextView. |
hasControls |
Indicates whether the FormattedTextView contains other controls. |
indexOfControl |
Checks for the provided |
insertControl |
Inserts a control into the aggregation controls. |
removeAllControls |
Removes all the controls from the aggregation controls. Additionally, it unregisters them from the hosting UIArea. |
removeControl |
Removes a control from the aggregation controls. |
setAccessibleRole |
Sets a new value for property accessibleRole. The ARIA role for the control. When called with a value of Default value is |
setContent |
Sets text with placeholders and given array of controls. |
setHtmlText |
Sets the HTML text to be displayed. |
Adds some control to the aggregation controls.
Param | Type | DefaultValue | Description |
---|---|---|---|
oControl | sap.ui.core.Control |
The control to add; if empty, nothing is inserted |
Creates a new subclass of class sap.ui.commons.FormattedTextView 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.
Param | Type | DefaultValue | Description |
---|---|---|---|
sClassName | string |
Name of the class being created |
|
oClassInfo | object |
Object literal with information about the class |
|
FNMetaImpl | function |
Constructor function for the metadata object; if not given, it defaults to the metadata implementation used by this class |
Gets current value of property accessibleRole.
The ARIA role for the control.
Default value is Document
.
Gets content of aggregation controls.
Array of controls that should be replaced within htmlText.
Gets current value of property htmlText.
Determines text with placeholders.
Default value is empty string
.
Returns a metadata object for class sap.ui.commons.FormattedTextView.
Checks for the provided sap.ui.core.Control
in the aggregation controls. and returns its index if found or -1 otherwise.
Param | Type | DefaultValue | Description |
---|---|---|---|
oControl | sap.ui.core.Control |
The control whose index is looked for |
Inserts a control into the aggregation controls.
Param | Type | DefaultValue | Description |
---|---|---|---|
oControl | sap.ui.core.Control |
The control to insert; if empty, nothing is inserted |
|
iIndex | int |
The |
Removes all the controls from the aggregation controls.
Additionally, it unregisters them from the hosting UIArea.
Removes a control from the aggregation controls.
Param | Type | DefaultValue | Description |
---|---|---|---|
vControl | int string sap.ui.core.Control |
The control to remove or its index or id |
Sets a new value for property accessibleRole.
The ARIA role for the control.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is Document
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sAccessibleRole | sap.ui.core.AccessibleRole | Document |
New value for property |
Sets text with placeholders and given array of controls.
Param | Type | DefaultValue | Description |
---|---|---|---|
sHtmlText | string |
Contains the corresponding HTML text |
|
aControls | sap.ui.commons.FormattedTextViewControl |
Array of controls that should be used within given HTML text |