Class sap.suite.ui.commons.FeedTileModule: sap/suite/ui/commons/FeedTile

extends Control

This control displays news feeds.

Deprecated API:Since version 1.25. This control has been deprecated in favor of new sap.suite.ui.commons.GenericTile.

Constructor Summary
new sap.suite.ui.commons.FeedTile(sId?, mSettings?)Constructor for a new FeedTile.
Event Summary
press(oControlEvent)The event fired when the user clicks on the control.
Events borrowed from class sap.ui.core.Control
Method Summary
sap.suite.ui.commons.FeedTile.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.suite.ui.commons.FeedTile with name sClassName and enriches it with the information contained in oClassInfo.
sap.suite.ui.commons.FeedTile.getMetadata()Returns a metadata object for class sap.suite.ui.commons.FeedTile.
addItem(oItem)Adds some item oItem to the aggregation named items.
attachPress(oData?, fnFunction, oListener?)Attach event handler fnFunction to the 'press' event of this sap.suite.ui.commons.FeedTile.
destroyItems()Destroys all the items in the aggregation named items.
detachPress(fnFunction, oListener)Detach event handler fnFunction from the 'press' event of this sap.suite.ui.commons.FeedTile.
firePress(mArguments?)Fire event press to attached listeners.
getDefaultImages()Getter for property defaultImages.
getDisplayArticleImage()Getter for property displayArticleImage.
getDisplayDuration()Getter for property displayDuration.
getItems()Getter for aggregation items.
getSource()Getter for property source.
indexOfItem(oItem)Checks for the provided sap.suite.ui.commons.FeedItem in the aggregation named items and returns its index if found or -1 otherwise.
insertItem(oItem, iIndex)Inserts a item into the aggregation named items.
removeAllItems()Removes all the controls in the aggregation named items.
removeItem(vItem)Removes an item from the aggregation named items.
setDefaultImages(oDefaultImages)Validate the array of URI first and then set the defaultImages property
setDisplayArticleImage(bDisplayArticleImage)Setter for property displayArticleImage.
setDisplayDuration(iDisplayDuration)Set displayDuration property for the control
setSource(sSource)Setter for property source.
stageModel(oModel)Set a new model of feed items, such as when a feed aggregator has collected the latest feed items.
Constructor Detail
new sap.suite.ui.commons.FeedTile(sId?, mSettings?)
Constructor for a new FeedTile.

Accepts an object literal mSettings that defines initial property values, aggregated and associated objects as well as event handlers.

If the name of a setting is ambiguous (e.g. a property has the same name as an event), then the framework assumes property, aggregation, association, event in that order. To override this automatic resolution, one of the prefixes "aggregation:", "association:" or "event:" can be added to the name of the setting (such a prefixed name must be enclosed in single or double quotes).

The supported settings are:

  • Properties
  • Aggregations
    • items : sap.suite.ui.commons.FeedItem[]
  • Associations
    • Events
      • press : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
    Parameters:
    {string}sId? id for the new control, generated automatically if no id is given
    {object}mSettings? initial settings for the new control
    Deprecated:
    Since version 1.25. This control has been deprecated in favor of new sap.suite.ui.commons.GenericTile.
    Event Detail
    press(oControlEvent)
    The event fired when the user clicks on the control.
    Parameters:
    {sap.ui.base.Event}oControlEvent
    {sap.ui.base.EventProvider}oControlEvent.getSource
    {object}oControlEvent.getParameters
    Method Detail
    sap.suite.ui.commons.FeedTile.extend(sClassName, oClassInfo?, FNMetaImpl?): function
    Creates a new subclass of class sap.suite.ui.commons.FeedTile with name sClassName and enriches it with the information contained in oClassInfo.

    oClassInfo might contain the same kind of informations as described in Element.extend.

    Parameters:
    {string}sClassName name of the class to be created
    {object}oClassInfo? object literal with informations about the class
    {function}FNMetaImpl? constructor function for the metadata object. If not given, it defaults to sap.ui.core.ElementMetadata.
    Returns:
    {function} the created class / constructor function
    sap.suite.ui.commons.FeedTile.getMetadata(): sap.ui.base.Metadata
    Returns a metadata object for class sap.suite.ui.commons.FeedTile.
    Returns:
    {sap.ui.base.Metadata} Metadata object describing this class
    Adds some item oItem to the aggregation named items.
    Parameters:
    {sap.suite.ui.commons.FeedItem}oItem the item to add; if empty, nothing is inserted
    Returns:
    {sap.suite.ui.commons.FeedTile}this to allow method chaining
    attachPress(oData?, fnFunction, oListener?): sap.suite.ui.commons.FeedTile
    Attach event handler fnFunction to the 'press' event of this sap.suite.ui.commons.FeedTile.
    . When called, the context of the event handler (its this) will be bound to oListener if specified otherwise to this sap.suite.ui.commons.FeedTile.
    itself.

    The event fired when the user clicks 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 call, when the event occurs.
    {object}oListener? Context object to call the event handler with. Defaults to this sap.suite.ui.commons.FeedTile.
    itself.
    Returns:
    {sap.suite.ui.commons.FeedTile}this to allow method chaining
    Destroys all the items in the aggregation named items.
    Returns:
    {sap.suite.ui.commons.FeedTile}this to allow method chaining
    detachPress(fnFunction, oListener): sap.suite.ui.commons.FeedTile
    Detach event handler fnFunction from the 'press' event of this sap.suite.ui.commons.FeedTile.

    The passed function and listener object must match the ones used for event registration.

    Parameters:
    {function}fnFunction The function to call, when the event occurs.
    {object}oListener Context object on which the given function had to be called.
    Returns:
    {sap.suite.ui.commons.FeedTile}this to allow method chaining
    firePress(mArguments?): sap.suite.ui.commons.FeedTile
    Fire event press to attached listeners.
    Parameters:
    {Map}mArguments? the arguments to pass along with the event.
    Returns:
    {sap.suite.ui.commons.FeedTile}this to allow method chaining
    getDefaultImages(): sap.ui.core.URI[]
    Getter for property defaultImages. A list of default images that is cycled by the control when no image is available for a feed item or when no feed items exist. After a random image is displayed first time, control cycles through this list of images.

    Default value is empty/undefined

    Returns:
    {sap.ui.core.URI[]} the value of property defaultImages
    getDisplayArticleImage(): boolean
    Getter for property displayArticleImage. To display article Image or not. If it is true, the article Image will be displayed based on precedence. If it is false, the default image will be displayed.

    Default value is true

    Returns:
    {boolean} the value of property displayArticleImage
    getDisplayDuration(): int
    Getter for property displayDuration. The length of time in seconds the control displays each feed item. Default value is 5 seconds.

    Default value is 5

    Returns:
    {int} the value of property displayDuration
    Getter for aggregation items.
    The feed items the control cycles through.
    Returns:
    {sap.suite.ui.commons.FeedItem[]}
    getSource(): string
    Getter for property source. The source of the feed item.

    Default value is empty/undefined

    Returns:
    {string} the value of property source
    indexOfItem(oItem): int
    Checks for the provided sap.suite.ui.commons.FeedItem in the aggregation named items and returns its index if found or -1 otherwise.
    Parameters:
    {sap.suite.ui.commons.FeedItem}oItem the item whose index is looked for.
    Returns:
    {int} the index of the provided control in the aggregation if found, or -1 otherwise
    insertItem(oItem, iIndex): sap.suite.ui.commons.FeedTile
    Inserts a item into the aggregation named items.
    Parameters:
    {sap.suite.ui.commons.FeedItem}oItem the item to insert; if empty, nothing is inserted
    {int}iIndex the 0-based index the item should be inserted at; for a negative value of iIndex, the item is inserted at position 0; for a value greater than the current size of the aggregation, the item is inserted at the last position
    Returns:
    {sap.suite.ui.commons.FeedTile}this to allow method chaining
    removeAllItems(): sap.suite.ui.commons.FeedItem[]
    Removes all the controls in the aggregation named items.
    Additionally unregisters them from the hosting UIArea.
    Returns:
    {sap.suite.ui.commons.FeedItem[]} an array of the removed elements (might be empty)
    removeItem(vItem): sap.suite.ui.commons.FeedItem
    Removes an item from the aggregation named items.
    Parameters:
    {int|string|sap.suite.ui.commons.FeedItem}vItem the item to remove or its index or id
    Returns:
    {sap.suite.ui.commons.FeedItem} the removed item or null
    setDefaultImages(oDefaultImages)
    Validate the array of URI first and then set the defaultImages property
    Parameters:
    {object[]}oDefaultImages
    setDisplayArticleImage(bDisplayArticleImage): sap.suite.ui.commons.FeedTile
    Setter for property displayArticleImage.

    Default value is true

    Parameters:
    {boolean}bDisplayArticleImage new value for property displayArticleImage
    Returns:
    {sap.suite.ui.commons.FeedTile}this to allow method chaining
    setDisplayDuration(iDisplayDuration)
    Set displayDuration property for the control
    Parameters:
    {int}iDisplayDuration
    setSource(sSource): sap.suite.ui.commons.FeedTile
    Setter for property source.

    Default value is empty/undefined

    Parameters:
    {string}sSource new value for property source
    Returns:
    {sap.suite.ui.commons.FeedTile}this to allow method chaining
    stageModel(oModel)
    Set a new model of feed items, such as when a feed aggregator has collected the latest feed items. This model is staged (not immediately set on the control) to avoid re-rendering before the currently displayed article is faded out. Therefore a smooth transition between the display of feed items is always maintained.
    Parameters:
    oModel Model of new feed items.