Class sap.m.FeedListItemModule: sap/m/FeedListItem
The control provides a set of properties for text, sender information, time stamp. Beginning with release 1.23 the new feature expand / collapse was introduced, which uses the property maxCharacters.
Since: 1.12.
sClassName
and enriches it with the information contained in oClassInfo
.fnFunction
to the iconPress
event of this sap.m.FeedListItem
.fnFunction
to the senderPress
event of this sap.m.FeedListItem
.fnFunction
from the iconPress
event of this sap.m.FeedListItem
.fnFunction
from the senderPress
event of this sap.m.FeedListItem
. 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
- icon : sap.ui.core.URI
- activeIcon : sap.ui.core.URI
- sender : string
- text : string
- info : string
- timestamp : string
- senderActive : boolean (default: true)
- iconActive : boolean (default: true)
- iconDensityAware : boolean (default: true)
- showIcon : boolean (default: true)
- maxCharacters : int
- Events
- senderPress : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
- iconPress : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
In addition, all settings applicable to the base type sap.m.ListItemBase can be used as well.
{string} | sId? | id for the new control, generated automatically if no id is given |
{object} | mSettings? | initial settings for the new control |
{sap.ui.base.Event} | oControlEvent | |
{sap.ui.base.EventProvider} | oControlEvent.getSource | |
{object} | oControlEvent.getParameters | |
{string} | oControlEvent.getParameters.domRef | Dom reference of the feed item's icon to be used for positioning. |
{function} | oControlEvent.getParameters.getDomRef | Function to retrieve the DOM reference for the iconPress event. The function returns the DOM element of the icon or null |
{sap.ui.base.Event} | oControlEvent | |
{sap.ui.base.EventProvider} | oControlEvent.getSource | |
{object} | oControlEvent.getParameters | |
{string} | oControlEvent.getParameters.domRef | Dom reference of the feed item's sender string to be used for positioning. |
{function} | oControlEvent.getParameters.getDomRef | Function to retrieve the DOM reference for the senderPress event. The function returns the DOM element of the sender link or null |
sClassName
and enriches it with the information contained in oClassInfo
. oClassInfo
might contain the same kind of information as described in sap.m.ListItemBase.extend.
{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 |
{function} | Created class / constructor function |
{sap.ui.base.Metadata} | Metadata object describing this class |
fnFunction
to the iconPress
event of this sap.m.FeedListItem
. 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.FeedListItem
itself.
Event is fired when the icon is pressed.
{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.FeedListItem itself |
{sap.m.FeedListItem} | Reference to this in order to allow method chaining |
fnFunction
to the senderPress
event of this sap.m.FeedListItem
. 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.FeedListItem
itself.
Event is fired when name of the sender is pressed.
{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.FeedListItem itself |
{sap.m.FeedListItem} | Reference to this in order to allow method chaining |
fnFunction
from the iconPress
event of this sap.m.FeedListItem
. The passed function and listener object must match the ones used for event registration.
{function} | fnFunction | The function to be called, when the event occurs |
{object} | oListener | Context object on which the given function had to be called |
{sap.m.FeedListItem} | Reference to this in order to allow method chaining |
fnFunction
from the senderPress
event of this sap.m.FeedListItem
. The passed function and listener object must match the ones used for event registration.
{function} | fnFunction | The function to be called, when the event occurs |
{object} | oListener | Context object on which the given function had to be called |
{sap.m.FeedListItem} | Reference to this in order to allow method chaining |
iconPress
to attached listeners. Expects the following event parameters:
domRef
of typestring
Dom reference of the feed item's icon to be used for positioning.getDomRef
of typefunction
Function to retrieve the DOM reference for theiconPress
event. The function returns the DOM element of the icon or null
{Map} | mArguments? | The arguments to pass along with the event |
{sap.m.FeedListItem} | Reference to this in order to allow method chaining |
senderPress
to attached listeners. Expects the following event parameters:
domRef
of typestring
Dom reference of the feed item's sender string to be used for positioning.getDomRef
of typefunction
Function to retrieve the DOM reference for thesenderPress
event. The function returns the DOM element of the sender link or null
{Map} | mArguments? | The arguments to pass along with the event |
{sap.m.FeedListItem} | Reference to this in order to allow method chaining |
activeIcon
. Icon displayed when the list item is active.
{sap.ui.core.URI} | Value of property activeIcon |
icon
. Icon to be displayed as graphical element within the FeedListItem. This can be an image or an icon from the icon font. If no icon is provided, a default person-placeholder icon is displayed. Icon is only shown if showIcon = true.
{sap.ui.core.URI} | Value of property icon |
iconActive
. If true, icon is an link, which will fire 'iconPress' events. If false, icon is normal image
Default value is true
.
{boolean} | Value of property iconActive |
iconDensityAware
. By default, this is set to true but then one or more requests are sent trying to get the density perfect version of image if this version of image doesn't exist on the server.
If bandwidth is the key for the application, set this value to false.
Default value is true
.
{boolean} | Value of property iconDensityAware |
info
. The Info text.
{string} | Value of property info |
maxCharacters
. The expand and collapse feature is set by default and uses 300 characters on mobile devices and 500 characters on desktops as limits. Based on these values, the text of the FeedListItem is collapsed once text reaches these limits. In this case, only the specified number of characters is displayed. By clicking on the text link More, the entire text can be displayed. The text link Less collapses the text. The application is able to set the value to its needs.
{int} | Value of property maxCharacters |
sender
. Sender of the chunk
{string} | Value of property sender |
senderActive
. If true, sender string is an link, which will fire 'senderPress' events. If false, sender is normal text.
Default value is true
.
{boolean} | Value of property senderActive |
showIcon
. If set to "true" (default), icons will be displayed, if set to false icons are hidden
Default value is true
.
{boolean} | Value of property showIcon |
text
. The FeedListItem text.
{string} | Value of property text |
timestamp
. This chunks timestamp
{string} | Value of property timestamp |
activeIcon
. Icon displayed when the list item is active.
When called with a value of null
or undefined
, the default value of the property will be restored.
{sap.ui.core.URI} | sActiveIcon | New value for property activeIcon |
{sap.m.FeedListItem} | Reference to this in order to allow method chaining |
icon
. Icon to be displayed as graphical element within the FeedListItem. This can be an image or an icon from the icon font. If no icon is provided, a default person-placeholder icon is displayed. Icon is only shown if showIcon = true.
When called with a value of null
or undefined
, the default value of the property will be restored.
{sap.ui.core.URI} | sIcon | New value for property icon |
{sap.m.FeedListItem} | Reference to this in order to allow method chaining |
iconActive
. If true, icon is an link, which will fire 'iconPress' events. If false, icon is normal image
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is true
.
{boolean} | bIconActive | New value for property iconActive |
{sap.m.FeedListItem} | Reference to this in order to allow method chaining |
iconDensityAware
. By default, this is set to true but then one or more requests are sent trying to get the density perfect version of image if this version of image doesn't exist on the server.
If bandwidth is the key for the application, set this value to false.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is true
.
{boolean} | bIconDensityAware | New value for property iconDensityAware |
{sap.m.FeedListItem} | Reference to this in order to allow method chaining |
info
. The Info text.
When called with a value of null
or undefined
, the default value of the property will be restored.
{string} | sInfo | New value for property info |
{sap.m.FeedListItem} | Reference to this in order to allow method chaining |
maxCharacters
. The expand and collapse feature is set by default and uses 300 characters on mobile devices and 500 characters on desktops as limits. Based on these values, the text of the FeedListItem is collapsed once text reaches these limits. In this case, only the specified number of characters is displayed. By clicking on the text link More, the entire text can be displayed. The text link Less collapses the text. The application is able to set the value to its needs.
When called with a value of null
or undefined
, the default value of the property will be restored.
{int} | iMaxCharacters | New value for property maxCharacters |
{sap.m.FeedListItem} | Reference to this in order to allow method chaining |
sender
. Sender of the chunk
When called with a value of null
or undefined
, the default value of the property will be restored.
{string} | sSender | New value for property sender |
{sap.m.FeedListItem} | Reference to this in order to allow method chaining |
senderActive
. If true, sender string is an link, which will fire 'senderPress' events. If false, sender is normal text.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is true
.
{boolean} | bSenderActive | New value for property senderActive |
{sap.m.FeedListItem} | Reference to this in order to allow method chaining |
showIcon
. If set to "true" (default), icons will be displayed, if set to false icons are hidden
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is true
.
{boolean} | bShowIcon | New value for property showIcon |
{sap.m.FeedListItem} | Reference to this in order to allow method chaining |
text
. The FeedListItem text.
When called with a value of null
or undefined
, the default value of the property will be restored.
{string} | sText | New value for property text |
{sap.m.FeedListItem} | Reference to this in order to allow method chaining |
timestamp
. This chunks timestamp
When called with a value of null
or undefined
, the default value of the property will be restored.
{string} | sTimestamp | New value for property timestamp |
{sap.m.FeedListItem} | Reference to this in order to allow method chaining |
{sap.m.ListType} | type | new value for property type |
{sap.m.FeedListItem} | this allows method chaining |
{boolean} | value | new value for property unread is ignored |
{sap.m.FeedListItem} | this allows method chaining |