known direct subclasses: ActionListItem,
BarListItem,
ClusterListItem,
ColumnListItem,
CustomListItem,
DisplayListItem,
FacetFilterItem,
FeedItemHeader,
FeedListItem,
GroupHeaderListItem,
InputListItem,
NotificationListBase,
ObjectListItem,
StandardListItem
ListItemBase contains the base features of all specific list items.
Field Summary
isSelectedReturns the state of the item selection as a boolean Event Summary
detailPress(oControlEvent)Fires when the user clicks on the detail button of the control. press(oControlEvent)Fires when the user clicks on the control. detailTap(oControlEvent)Fires when the user taps on the detail button of the control. tap(oControlEvent)Fires when the user taps on the control. Method Summary
sap.m.ListItemBase.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.m.ListItemBase with name sClassName
and enriches it with the information contained in oClassInfo
. addAriaLabelledBy(vAriaLabelledBy)Adds some ariaLabelledBy into the association ariaLabelledBy
. attachDetailPress(oData?, fnFunction, oListener?)Attaches event handler fnFunction
to the detailPress
event of this sap.m.ListItemBase
. attachPress(oData?, fnFunction, oListener?)Attaches event handler fnFunction
to the press
event of this sap.m.ListItemBase
. detachDetailPress(fnFunction, oListener)Detaches event handler fnFunction
from the detailPress
event of this sap.m.ListItemBase
. detachPress(fnFunction, oListener)Detaches event handler fnFunction
from the press
event of this sap.m.ListItemBase
. firePress(mArguments?)Fires event press
to attached listeners. getAriaLabelledBy()Returns array of IDs of the elements which are the current targets of the association ariaLabelledBy
. getCounter()Gets current value of property counter
. getTabbables()Returns the tabbable DOM elements as a jQuery collection getType()Gets current value of property type
. getUnread()Gets current value of property unread
. getVisible()Gets current value of property visible
. removeAriaLabelledBy(vAriaLabelledBy)Removes an ariaLabelledBy from the association named ariaLabelledBy
. setCounter(iCounter)Sets a new value for property counter
. setSelected(bSelected)Sets a new value for property selected
. setType(sType)Sets a new value for property type
. setUnread(bUnread)Sets a new value for property unread
. setVisible(bVisible)Sets a new value for property visible
. attachDetailTap(oData?, fnFunction, oListener?)Attaches event handler fnFunction
to the detailTap
event of this sap.m.ListItemBase
. attachTap(oData?, fnFunction, oListener?)Attaches event handler fnFunction
to the tap
event of this sap.m.ListItemBase
. detachDetailTap(fnFunction, oListener)Detaches event handler fnFunction
from the detailTap
event of this sap.m.ListItemBase
. detachTap(fnFunction, oListener)Detaches event handler fnFunction
from the tap
event of this sap.m.ListItemBase
. fireDetailTap(mArguments?)Fires event detailTap
to attached listeners. fireTap(mArguments?)Fires event tap
to attached listeners. addStyleClass,
allowTextSelection,
attachBrowserEvent,
attachValidateFieldGroup,
checkFieldGroupIds,
clone,
detachBrowserEvent,
detachValidateFieldGroup,
fireValidateFieldGroup,
getAccessibilityInfo,
getBusy,
getBusyIndicatorDelay,
getControlsByFieldGroupId,
getFieldGroupIds,
getIdForLabel,
getRenderer,
hasStyleClass,
invalidate,
isBusy,
onAfterRendering,
onBeforeRendering,
placeAt,
removeStyleClass,
rerender,
setBusy,
setBusyIndicatorDelay,
setFieldGroupIds,
toggleStyleClass,
triggerValidateFieldGroup $,
addCustomData,
addDependent,
addEventDelegate,
applyFocusInfo,
bindElement,
data,
destroy,
destroyCustomData,
destroyDependents,
destroyLayoutData,
destroyTooltip,
enhanceAccessibilityState,
exit,
findElements,
fireEvent,
focus,
getCustomData,
getDependents,
getDomRef,
getElementBinding,
getFocusDomRef,
getFocusInfo,
getInterface,
getLayoutData,
getMetadata,
getTooltip,
getTooltip_AsString,
getTooltip_Text,
indexOfCustomData,
indexOfDependent,
init,
insertCustomData,
insertDependent,
prop,
removeAllCustomData,
removeAllDependents,
removeCustomData,
removeDependent,
removeEventDelegate,
setLayoutData,
setTooltip,
toString,
unbindElement addAggregation,
addAssociation,
applySettings,
attachFormatError,
attachModelContextChange,
attachParseError,
attachValidationError,
attachValidationSuccess,
bindAggregation,
bindContext,
bindObject,
bindProperty,
destroyAggregation,
detachFormatError,
detachModelContextChange,
detachParseError,
detachValidationError,
detachValidationSuccess,
findAggregatedObjects,
fireFormatError,
fireModelContextChange,
fireParseError,
fireValidationError,
fireValidationSuccess,
getAggregation,
getAssociation,
getBinding,
getBindingContext,
getBindingInfo,
getBindingPath,
getEventingParent,
getId,
getModel,
getObjectBinding,
getOriginInfo,
getParent,
getProperty,
hasModel,
indexOfAggregation,
insertAggregation,
isBound,
isInvalidateSuppressed,
isTreeBinding,
propagateMessages,
removeAggregation,
removeAllAggregation,
removeAllAssociation,
removeAssociation,
setAggregation,
setAssociation,
setBindingContext,
setModel,
setProperty,
unbindAggregation,
unbindContext,
unbindObject,
unbindProperty,
validateAggregation,
validateProperty Constructor Detail
new sap.m.ListItemBase(sId?, mSettings?)
Constructor for a new ListItemBase.
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:
- Properties
- Events
- tap : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
- detailTap : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
- press : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
- detailPress : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
In addition, all settings applicable to the base type sap.ui.core.Control can be used as well.
Parameters:
{string} | sId? | Id for the new control, generated automatically if no id is given |
{object} | mSettings? | Initial settings for the new control |
Field Detail
isSelected
Returns the state of the item selection as a boolean
- Deprecated:
- Since version 1.10.2. API Change makes this method unnecessary. Use getSelected method instead.
Event Detail
detailPress(oControlEvent)
Fires when the user clicks on the detail button of the control.
Parameters:
press(oControlEvent)
Fires when the user clicks on the control.
Note: This event is not fired when the parent
mode
is
SingleSelectMaster
or when the
includeItemInSelection
property is set to
true
. If there is an interactive element that handles its own
press
event then the list item's
press
event is not fired. Also see
sap.m.ListBase#attachItemPress.
Parameters:
detailTap(oControlEvent)
Fires when the user taps on the detail button of the control.
Parameters:
- Deprecated:
- Since version 1.20.0. Instead, use
detailPress
event.
tap(oControlEvent)
Fires when the user taps on the control.
Parameters:
- Deprecated:
- Since version 1.20.0. Instead, use
press
event.
Method Detail
sap.m.ListItemBase.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.m.ListItemBase 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.m.ListItemBase.
Returns:
Adds some ariaLabelledBy into the association ariaLabelledBy
.
Parameters:
{string|sap.ui.core.Control} | vAriaLabelledBy | the ariaLabelledBy to add; if empty, nothing is inserted |
- Since:
- 1.28.0
Returns:
Attaches event handler
fnFunction
to the
detailPress
event of this
sap.m.ListItemBase
.
When called, the context of the event handler (its this
) will be bound to oListener
if specified, otherwise it will be bound to this sap.m.ListItemBase
itself.
Fires when the user clicks on the detail button of the control.
Parameters:
{object} | oData? | An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
{function} | fnFunction | The function to be called when the event occurs |
{object} | oListener? | Context object to call the event handler with. Defaults to this sap.m.ListItemBase itself |
Returns:
Attaches event handler
fnFunction
to the
press
event of this
sap.m.ListItemBase
.
When called, the context of the event handler (its this
) will be bound to oListener
if specified, otherwise it will be bound to this sap.m.ListItemBase
itself.
Fires when the user clicks on the control. Note: This event is not fired when the parent mode
is SingleSelectMaster
or when the includeItemInSelection
property is set to true
. If there is an interactive element that handles its own press
event then the list item's press
event is not fired. Also see sap.m.ListBase#attachItemPress.
Parameters:
{object} | oData? | An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
{function} | fnFunction | The function to be called when the event occurs |
{object} | oListener? | Context object to call the event handler with. Defaults to this sap.m.ListItemBase itself |
Returns:
Detaches event handler
fnFunction
from the
detailPress
event of this
sap.m.ListItemBase
.
The passed function and listener object must match the ones used for event registration.
Parameters:
{function} | fnFunction | The function to be called, when the event occurs |
{object} | oListener | Context object on which the given function had to be called |
Returns:
Detaches event handler
fnFunction
from the
press
event of this
sap.m.ListItemBase
.
The passed function and listener object must match the ones used for event registration.
Parameters:
{function} | fnFunction | The function to be called, when the event occurs |
{object} | oListener | Context object on which the given function had to be called |
Returns:
Fires event detailPress
to attached listeners.
Parameters:
{Map} | mArguments? | The arguments to pass along with the event |
Returns:
Fires event press
to attached listeners.
Parameters:
{Map} | mArguments? | The arguments to pass along with the event |
Returns:
Returns array of IDs of the elements which are the current targets of the association ariaLabelledBy
.
- Since:
- 1.28.0
Returns:
getCounter(): int
Gets current value of property
counter
.
Defines the counter value of the list items.
Returns:
{int} | Value of property counter |
getSelected(): boolean
Gets current value of property
selected
.
Defines the selected state of the list items. Note: Binding the selected
property in single selection modes may cause unwanted results if you have more than one selected items in your binding.
Default value is false
.
Returns:
{boolean} | Value of property selected |
Returns the tabbable DOM elements as a jQuery collection
- Since:
- 1.26
Returns:
Gets current value of property
type
.
Defines the visual indication and behavior of the list items, e.g. Active
, Navigation
, Detail
.
Default value is Inactive
.
Returns:
getUnread(): boolean
Gets current value of property
unread
.
Activates the unread indicator for the list item, if set to true
. Note: This flag is ignored when the showUnread
property of the parent is set to false
.
Default value is false
.
Returns:
{boolean} | Value of property unread |
getVisible(): boolean
Gets current value of property
visible
.
Whether the control should be visible on the screen. If set to false, a placeholder is rendered instead of the real control.
Default value is true
.
Returns:
{boolean} | Value of property visible |
Removes all the controls in the association named ariaLabelledBy
.
- Since:
- 1.28.0
Returns:
Removes an ariaLabelledBy from the association named ariaLabelledBy
.
Parameters:
{int|string|sap.ui.core.Control} | vAriaLabelledBy | The ariaLabelledByto be removed or its index or ID |
- Since:
- 1.28.0
Returns:
Sets a new value for property
counter
.
Defines the counter value of the list items.
When called with a value of null
or undefined
, the default value of the property will be restored.
Parameters:
{int} | iCounter | New value for property counter |
Returns:
Sets a new value for property
selected
.
Defines the selected state of the list items. Note: Binding the selected
property in single selection modes may cause unwanted results if you have more than one selected items in your binding.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is false
.
Parameters:
{boolean} | bSelected | New value for property selected |
Returns:
Sets a new value for property
type
.
Defines the visual indication and behavior of the list items, e.g. Active
, Navigation
, Detail
.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is Inactive
.
Parameters:
Returns:
Sets a new value for property
unread
.
Activates the unread indicator for the list item, if set to true
. Note: This flag is ignored when the showUnread
property of the parent is set to false
.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is false
.
Parameters:
{boolean} | bUnread | New value for property unread |
Returns:
Sets a new value for property
visible
.
Whether the control should be visible on the screen. If set to false, a placeholder is rendered instead of the real control.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is true
.
Parameters:
{boolean} | bVisible | New value for property visible |
Returns:
Attaches event handler
fnFunction
to the
detailTap
event of this
sap.m.ListItemBase
.
When called, the context of the event handler (its this
) will be bound to oListener
if specified, otherwise it will be bound to this sap.m.ListItemBase
itself.
Fires when the user taps on the detail button of the control.
Parameters:
{object} | oData? | An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
{function} | fnFunction | The function to be called when the event occurs |
{object} | oListener? | Context object to call the event handler with. Defaults to this sap.m.ListItemBase itself |
- Deprecated:
- Since version 1.20.0. Instead, use
detailPress
event.
Returns:
Attaches event handler
fnFunction
to the
tap
event of this
sap.m.ListItemBase
.
When called, the context of the event handler (its this
) will be bound to oListener
if specified, otherwise it will be bound to this sap.m.ListItemBase
itself.
Fires when the user taps on the control.
Parameters:
{object} | oData? | An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
{function} | fnFunction | The function to be called when the event occurs |
{object} | oListener? | Context object to call the event handler with. Defaults to this sap.m.ListItemBase itself |
- Deprecated:
- Since version 1.20.0. Instead, use
press
event.
Returns:
Detaches event handler
fnFunction
from the
detailTap
event of this
sap.m.ListItemBase
.
The passed function and listener object must match the ones used for event registration.
Parameters:
{function} | fnFunction | The function to be called, when the event occurs |
{object} | oListener | Context object on which the given function had to be called |
- Deprecated:
- Since version 1.20.0. Instead, use
detailPress
event.
Returns:
Detaches event handler
fnFunction
from the
tap
event of this
sap.m.ListItemBase
.
The passed function and listener object must match the ones used for event registration.
Parameters:
{function} | fnFunction | The function to be called, when the event occurs |
{object} | oListener | Context object on which the given function had to be called |
- Deprecated:
- Since version 1.20.0. Instead, use
press
event.
Returns:
Fires event detailTap
to attached listeners.
Parameters:
{Map} | mArguments? | The arguments to pass along with the event |
- Deprecated:
- Since version 1.20.0. Instead, use
detailPress
event.
Returns:
Fires event tap
to attached listeners.
Parameters:
{Map} | mArguments? | The arguments to pass along with the event |
- Deprecated:
- Since version 1.20.0. Instead, use
press
event.
Returns: