A control base type.
Constructor for a new Item.
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.core.Item(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 |
---|---|---|---|
enabled | boolean | true | Enabled items can be selected. Visibility: public |
key | string | Can be used as input for subsequent actions. Visibility: public |
|
text | string | empty string | The text to be displayed for the item. Visibility: public |
textDirection | sap.ui.core.TextDirection | Inherit | Options are RTL and LTR. Alternatively, an item can inherit its text direction from its parent control. Visibility: public |
Name | Cardinality | Type | Description |
---|---|---|---|
customData | 0..n | sap.ui.core.CustomData |
Custom Data, a data structure like a map containing arbitrary key value pairs. |
dependents | 0..n | sap.ui.core.Element |
Dependents are not rendered, but their databinding context and lifecycle are bound to the aggregating Element. |
dragDropConfig | 0..n | sap.ui.core.dnd.DragDropBase |
Defines the drag-and-drop configuration. Note: This configuration might be ignored due to control metadata restrictions. |
layoutData | 0..1 | sap.ui.core.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. |
tooltip | 0..1 | sap.ui.core.TooltipBase |
The tooltip that should be shown for this Element. In the most simple case, a tooltip is a string that will be rendered by the control and displayed by the browser when the mouse pointer hovers over the control's DOM. In this variant, Controls need to explicitly support this kind of tooltip as they have to render it, but most controls do. Exceptions will be documented for the corresponding controls (e.g. Alternatively, UI5 currently does not provide a recommended implementation of See the section Using Tooltips
|
Method | Description |
---|---|
sap.ui.core.Item.extend |
Creates a new subclass of class sap.ui.core.Item with name
|
getEnabled |
Gets current value of property enabled. Enabled items can be selected. Default value is |
getKey |
Gets current value of property key. Can be used as input for subsequent actions. |
sap.ui.core.Item.getMetadata |
Returns a metadata object for class sap.ui.core.Item. |
getText |
Gets current value of property text. The text to be displayed for the item. Default value is |
getTextDirection |
Gets current value of property textDirection. Options are RTL and LTR. Alternatively, an item can inherit its text direction from its parent control. Default value is |
setEnabled |
Sets a new value for property enabled. Enabled items can be selected. When called with a value of Default value is |
setKey |
Sets a new value for property key. Can be used as input for subsequent actions. When called with a value of |
setText |
Sets a new value for property text. The text to be displayed for the item. When called with a value of Default value is |
setTextDirection |
Sets a new value for property textDirection. Options are RTL and LTR. Alternatively, an item can inherit its text direction from its parent control. When called with a value of Default value is |
Creates a new subclass of class sap.ui.core.Item 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.Element.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 enabled.
Enabled items can be selected.
Default value is true
.
Gets current value of property text.
The text to be displayed for the item.
Default value is empty string
.
Gets current value of property textDirection.
Options are RTL and LTR. Alternatively, an item can inherit its text direction from its parent control.
Default value is Inherit
.
Sets a new value for property enabled.
Enabled items can be selected.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is true
.
Param | Type | DefaultValue | Description |
---|---|---|---|
bEnabled | boolean | true |
New value for property |
Sets a new value for property key.
Can be used as input for subsequent actions.
When called with a value of null
or undefined
, the default value of the property will be restored.
Param | Type | DefaultValue | Description |
---|---|---|---|
sKey | string |
New value for property |
Sets a new value for property text.
The text to be displayed for the item.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is empty string
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sText | string | "" |
New value for property |
Sets a new value for property textDirection.
Options are RTL and LTR. Alternatively, an item can inherit its text direction from its parent control.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is Inherit
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sTextDirection | sap.ui.core.TextDirection | Inherit |
New value for property |