sap.ui.ux3.FeedChunk.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.ui.ux3.FeedChunk 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.ux3.FeedChunk.
Returns:
Adds some actionMenuItem to the aggregation actionMenuItems
.
Parameters:
Returns:
Adds some comment to the aggregation comments
.
Parameters:
Returns:
Attaches event handler
fnFunction
to the
actionItemSelected
event of this
sap.ui.ux3.FeedChunk
.
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.ui.ux3.FeedChunk
itself.
Event is fired when an item from the action menu button was selected.
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.ui.ux3.FeedChunk itself |
Returns:
Attaches event handler
fnFunction
to the
commentAdded
event of this
sap.ui.ux3.FeedChunk
.
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.ui.ux3.FeedChunk
itself.
Event is raised when a comment is added to the entry. This event is not supported for comment chunks.
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.ui.ux3.FeedChunk itself |
Returns:
Attaches event handler
fnFunction
to the
deleted
event of this
sap.ui.ux3.FeedChunk
.
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.ui.ux3.FeedChunk
itself.
Event is fired when the deletion button is pressed.
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.ui.ux3.FeedChunk itself |
Returns:
Attaches event handler
fnFunction
to the
inspect
event of this
sap.ui.ux3.FeedChunk
.
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.ui.ux3.FeedChunk
itself.
Event is fired when the inspect button was pressed
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.ui.ux3.FeedChunk itself |
Returns:
Attaches event handler
fnFunction
to the
referenceClicked
event of this
sap.ui.ux3.FeedChunk
.
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.ui.ux3.FeedChunk
itself.
Click on a @-reference
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.ui.ux3.FeedChunk itself |
Returns:
Attaches event handler
fnFunction
to the
senderClicked
event of this
sap.ui.ux3.FeedChunk
.
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.ui.ux3.FeedChunk
itself.
Event is fired when the thumbnail or the name of the sender is clicked.
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.ui.ux3.FeedChunk itself |
Returns:
Attaches event handler
fnFunction
to the
toggleFavorite
event of this
sap.ui.ux3.FeedChunk
.
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.ui.ux3.FeedChunk
itself.
Event is raised when the user clicks to set the entry as favorite. This event is not supported for comment chunks.
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.ui.ux3.FeedChunk itself |
Returns:
Attaches event handler
fnFunction
to the
toggleFlagged
event of this
sap.ui.ux3.FeedChunk
.
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.ui.ux3.FeedChunk
itself.
Event is raised when the user clicks to flag the entry. This event is not supported for comment chunks.
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.ui.ux3.FeedChunk itself |
Returns:
Attaches event handler
fnFunction
to the
toggleShared
event of this
sap.ui.ux3.FeedChunk
.
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.ui.ux3.FeedChunk
itself.
Event is raised when the user clicks to share the entry. This event is not supported for comment chunks.
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.ui.ux3.FeedChunk itself |
Returns:
Binds aggregation
actionMenuItems
to model data.
See ManagedObject.bindAggregation for a detailed description of the possible properties of oBindingInfo
.
Parameters:
{object} | oBindingInfo | The binding information |
Returns:
Binds aggregation
comments
to model data.
See ManagedObject.bindAggregation for a detailed description of the possible properties of oBindingInfo
.
Parameters:
{object} | oBindingInfo | The binding information |
Returns:
Destroys all the actionMenuItems in the aggregation actionMenuItems
.
Returns:
Destroys all the comments in the aggregation comments
.
Returns:
Detaches event handler
fnFunction
from the
actionItemSelected
event of this
sap.ui.ux3.FeedChunk
.
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
commentAdded
event of this
sap.ui.ux3.FeedChunk
.
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
deleted
event of this
sap.ui.ux3.FeedChunk
.
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
inspect
event of this
sap.ui.ux3.FeedChunk
.
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
referenceClicked
event of this
sap.ui.ux3.FeedChunk
.
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
senderClicked
event of this
sap.ui.ux3.FeedChunk
.
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
toggleFavorite
event of this
sap.ui.ux3.FeedChunk
.
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
toggleFlagged
event of this
sap.ui.ux3.FeedChunk
.
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
toggleShared
event of this
sap.ui.ux3.FeedChunk
.
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
actionItemSelected
to attached listeners.
Expects the following event parameters:
itemId
of type string
The Id of the selected itemitem
of type sap.ui.unified.MenuItemBase
The selected item
Parameters:
{Map} | mArguments? | The arguments to pass along with the event |
Returns:
Fires event
commentAdded
to attached listeners.
Expects the following event parameters:
comment
of type sap.ui.ux3.FeedChunk
New comment chunk
Parameters:
{Map} | mArguments? | The arguments to pass along with the event |
Returns:
Fires event deleted
to attached listeners.
Parameters:
{Map} | mArguments? | The arguments to pass along with the event |
Returns:
Fires event inspect
to attached listeners.
Parameters:
{Map} | mArguments? | The arguments to pass along with the event |
Returns:
Fires event
referenceClicked
to attached listeners.
Expects the following event parameters:
text
of type string
Text of the @-reference
Parameters:
{Map} | mArguments? | The arguments to pass along with the event |
Returns:
Fires event senderClicked
to attached listeners.
Parameters:
{Map} | mArguments? | The arguments to pass along with the event |
Returns:
Fires event
toggleFavorite
to attached listeners.
Expects the following event parameters:
favorite
of type boolean
Current favorite state
Parameters:
{Map} | mArguments? | The arguments to pass along with the event |
Returns:
Fires event
toggleFlagged
to attached listeners.
Expects the following event parameters:
flagged
of type boolean
Current flagged state
Parameters:
{Map} | mArguments? | The arguments to pass along with the event |
Returns:
Fires event
toggleShared
to attached listeners.
Expects the following event parameters:
shareed
of type boolean
Current shared state
Parameters:
{Map} | mArguments? | The arguments to pass along with the event |
Returns:
Gets content of aggregation
actionMenuItems
.
MenuItems to open when there is a click on the action menu button
Returns:
Gets content of aggregation
comments
.
Comments on this chunk
Returns:
getDeletionAllowed(): boolean
Gets current value of property
deletionAllowed
.
Flag if the deletion of the chunk shall be allowed
Default value is false
.
Returns:
{boolean} | Value of property deletionAllowed |
getEnableComment(): boolean
Gets current value of property
enableComment
.
If true the comment action is enabled.
Default value is true
.
Returns:
{boolean} | Value of property enableComment |
getEnableFavorite(): boolean
Gets current value of property
enableFavorite
.
If true the favorite action is enabled.
Default value is true
.
Returns:
{boolean} | Value of property enableFavorite |
getEnableFlag(): boolean
Gets current value of property
enableFlag
.
If true the flag action is enabled.
Default value is true
.
Returns:
{boolean} | Value of property enableFlag |
getEnableInspect(): boolean
Gets current value of property
enableInspect
.
If true the inspect action is enabled.
Default value is true
.
Returns:
{boolean} | Value of property enableInspect |
getEnableShare(): boolean
Gets current value of property
enableShare
.
If true the share action is enabled.
Default value is true
.
Returns:
{boolean} | Value of property enableShare |
getFavorite(): boolean
Gets current value of property
favorite
.
Defines whether the entry shall be displayed as favorite. This property is not supported for comment chunks.
Returns:
{boolean} | Value of property favorite |
getFeederSender(): string
Gets current value of property
feederSender
.
Sender for the comment feeder This property is optional if the chunk is a sub-control of a feed control. In this case the value of the feed control is used if it's not set. So it must be only set once on the feed control.
Returns:
{string} | Value of property feederSender |
Gets current value of property
feederThumbnailSrc
.
URL to the thumbnail image for the comment feeder. This property is optional if the chunk is a sub-control of a feed control. In this case the value of the feed control is used if it's not set. So it must be only set once on the feed control.
Returns:
getFlagged(): boolean
Gets current value of property
flagged
.
Defines whether the entry is flagged. This property is not supported for comment chunks.
Default value is false
.
Returns:
{boolean} | Value of property flagged |
getSender(): string
Gets current value of property
sender
.
Sender of the chunk
Returns:
{string} | Value of property sender |
getShared(): boolean
Gets current value of property
shared
.
Defines whether the entry shall be shared. This property is not supported for comment chunks.
Default value is false
.
Returns:
{boolean} | Value of property shared |
getText(): string
Gets current value of property
text
.
The FeedChunk text. @References are supported.
Returns:
{string} | Value of property text |
Gets current value of property
thumbnailSrc
.
URL to the thumbnail image.
Returns:
getTimestamp(): string
Gets current value of property
timestamp
.
Format is ISO 8601 YYYY-MM-DDThh:mm:ss.sZ, Z meaning the time is in UTC time zone
Returns:
{string} | Value of property timestamp |
indexOfActionMenuItem(oActionMenuItem): int
Checks for the provided sap.ui.commons.MenuItem
in the aggregation actionMenuItems
. 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 |
indexOfComment(oComment): int
Checks for the provided sap.ui.ux3.FeedChunk
in the aggregation comments
. 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 actionMenuItem into the aggregation actionMenuItems
.
Parameters:
{sap.ui.commons.MenuItem} | oActionMenuItem | the actionMenuItem to insert; if empty, nothing is inserted |
{int} | iIndex | the 0 -based index the actionMenuItem should be inserted at; for a negative value of iIndex , the actionMenuItem is inserted at position 0; for a value greater than the current size of the aggregation, the actionMenuItem is inserted at the last position |
Returns:
Inserts a comment into the aggregation comments
.
Parameters:
{sap.ui.ux3.FeedChunk} | oComment | the comment to insert; if empty, nothing is inserted |
{int} | iIndex | the 0 -based index the comment should be inserted at; for a negative value of iIndex , the comment is inserted at position 0; for a value greater than the current size of the aggregation, the comment is inserted at the last position |
Returns:
Removes a actionMenuItem from the aggregation actionMenuItems
.
Parameters:
Returns:
Removes all the controls from the aggregation
actionMenuItems
.
Additionally, it unregisters them from the hosting UIArea.
Returns:
Removes all the controls from the aggregation
comments
.
Additionally, it unregisters them from the hosting UIArea.
Returns:
Removes a comment from the aggregation comments
.
Parameters:
Returns:
Sets a new value for property
deletionAllowed
.
Flag if the deletion of the chunk shall be allowed
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is false
.
Parameters:
{boolean} | bDeletionAllowed | New value for property deletionAllowed |
Returns:
Sets a new value for property
enableComment
.
If true the comment action is enabled.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is true
.
Parameters:
{boolean} | bEnableComment | New value for property enableComment |
Returns:
Sets a new value for property
enableFavorite
.
If true the favorite action is enabled.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is true
.
Parameters:
{boolean} | bEnableFavorite | New value for property enableFavorite |
Returns:
Sets a new value for property
enableFlag
.
If true the flag action is enabled.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is true
.
Parameters:
{boolean} | bEnableFlag | New value for property enableFlag |
Returns:
Sets a new value for property
enableInspect
.
If true the inspect action is enabled.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is true
.
Parameters:
{boolean} | bEnableInspect | New value for property enableInspect |
Returns:
Sets a new value for property
enableShare
.
If true the share action is enabled.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is true
.
Parameters:
{boolean} | bEnableShare | New value for property enableShare |
Returns:
Sets a new value for property
favorite
.
Defines whether the entry shall be displayed as favorite. This property is not supported for comment chunks.
When called with a value of null
or undefined
, the default value of the property will be restored.
Parameters:
{boolean} | bFavorite | New value for property favorite |
Returns:
Sets a new value for property
feederSender
.
Sender for the comment feeder This property is optional if the chunk is a sub-control of a feed control. In this case the value of the feed control is used if it's not set. So it must be only set once on the feed control.
When called with a value of null
or undefined
, the default value of the property will be restored.
Parameters:
{string} | sFeederSender | New value for property feederSender |
Returns:
Sets a new value for property
feederThumbnailSrc
.
URL to the thumbnail image for the comment feeder. This property is optional if the chunk is a sub-control of a feed control. In this case the value of the feed control is used if it's not set. So it must be only set once on the feed control.
When called with a value of null
or undefined
, the default value of the property will be restored.
Parameters:
{sap.ui.core.URI} | sFeederThumbnailSrc | New value for property feederThumbnailSrc |
Returns:
Sets a new value for property
flagged
.
Defines whether the entry is flagged. This property is not supported for comment chunks.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is false
.
Parameters:
{boolean} | bFlagged | New value for property flagged |
Returns:
Sets a new value for property
sender
.
Sender of the chunk
When called with a value of null
or undefined
, the default value of the property will be restored.
Parameters:
{string} | sSender | New value for property sender |
Returns:
Sets a new value for property
shared
.
Defines whether the entry shall be shared. This property is not supported for comment chunks.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is false
.
Parameters:
{boolean} | bShared | New value for property shared |
Returns:
Sets a new value for property
text
.
The FeedChunk text. @References are supported.
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:
Sets a new value for property
thumbnailSrc
.
URL to the thumbnail image.
When called with a value of null
or undefined
, the default value of the property will be restored.
Parameters:
Returns:
Sets a new value for property
timestamp
.
Format is ISO 8601 YYYY-MM-DDThh:mm:ss.sZ, Z meaning the time is in UTC time zone
When called with a value of null
or undefined
, the default value of the property will be restored.
Parameters:
{string} | sTimestamp | New value for property timestamp |
Returns:
Unbinds aggregation actionMenuItems
from model data.
Returns:
Unbinds aggregation comments
from model data.
Returns:
getCommentChunk(): boolean
Gets current value of property
commentChunk
.
This flag changes a FeedChunk into a CommentChunk. In this case, it can not have own comments, furthermore it must be assigned to a FeedChunk.
Default value is false
.
- Deprecated:
- Since version 1.4.0. Not longer used. If a chunk is a comment is determined from hierarchy. If the parent is a chunk it's automatically a comment.
Returns:
{boolean} | Value of property commentChunk |
Sets a new value for property
commentChunk
.
This flag changes a FeedChunk into a CommentChunk. In this case, it can not have own comments, furthermore it must be assigned to a FeedChunk.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is false
.
Parameters:
{boolean} | bCommentChunk | New value for property commentChunk |
- Deprecated:
- Since version 1.4.0. Not longer used. If a chunk is a comment is determined from hierarchy. If the parent is a chunk it's automatically a comment.
Returns: