Class sap.ui.ux3.FeederModule: sap/ui/ux3/Feeder

extends Control

This feed control flavor represents a lean common feed, or a comment feed, with a text commit function. The control can be used stand alone or in a multiple way, and generally would be integrated directly into a UIArea.

Deprecated API:Since version 1.38. Instead, use the sap.m.FeedInput control.

Experimental API:Since version 1.2. The whole Feed/Feeder API is still under discussion, significant changes are likely. Especially text presentation (e.g. @-references and formatted text) is not final. Also the Feed model topic is still open.

Constructor Summary
new sap.ui.ux3.Feeder(sId?, mSettings?)Constructor for a new Feeder.
Event Summary
submit(oControlEvent)Event is fired when the entered text is submitted
Events borrowed from class sap.ui.core.Control
Method Summary
sap.ui.ux3.Feeder.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.ui.ux3.Feeder with name sClassName and enriches it with the information contained in oClassInfo.
sap.ui.ux3.Feeder.getMetadata()Returns a metadata object for class sap.ui.ux3.Feeder.
attachSubmit(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the submit event of this sap.ui.ux3.Feeder.
detachSubmit(fnFunction, oListener)Detaches event handler fnFunction from the submit event of this sap.ui.ux3.Feeder.
fireSubmit(mArguments?)Fires event submit to attached listeners.
getPlaceholderText()Gets current value of property placeholderText.
getText()Gets current value of property text.
getThumbnailSrc()Gets current value of property thumbnailSrc.
getType()Gets current value of property type.
setPlaceholderText(sPlaceholderText)Sets a new value for property placeholderText.
setText(sText)Sets a new value for property text.
setThumbnailSrc(sThumbnailSrc)Sets a new value for property thumbnailSrc.
setType(sType)Sets a new value for property type.
Constructor Detail
new sap.ui.ux3.Feeder(sId?, mSettings?)
Constructor for a new Feeder.

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
    • submit : 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
Deprecated:
Since version 1.38. Instead, use the sap.m.FeedInput control.
Event Detail
submit(oControlEvent)
Event is fired when the entered text is submitted
Parameters:
{sap.ui.base.Event}oControlEvent
{sap.ui.base.EventProvider}oControlEvent.getSource
{object}oControlEvent.getParameters
{string}oControlEvent.getParameters.text The text that is submitted
Method Detail
sap.ui.ux3.Feeder.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.ui.ux3.Feeder 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
sap.ui.ux3.Feeder.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.ui.ux3.Feeder.
Returns:
{sap.ui.base.Metadata} Metadata object describing this class
attachSubmit(oData?, fnFunction, oListener?): sap.ui.ux3.Feeder
Attaches event handler fnFunction to the submit event of this sap.ui.ux3.Feeder.

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.Feeder itself.

Event is fired when the entered text is submitted

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.Feeder itself
Returns:
{sap.ui.ux3.Feeder} Reference to this in order to allow method chaining
detachSubmit(fnFunction, oListener): sap.ui.ux3.Feeder
Detaches event handler fnFunction from the submit event of this sap.ui.ux3.Feeder.

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:
{sap.ui.ux3.Feeder} Reference to this in order to allow method chaining
fireSubmit(mArguments?): sap.ui.ux3.Feeder
Fires event submit to attached listeners.

Expects the following event parameters:

  • text of type stringThe text that is submitted
Parameters:
{Map}mArguments? The arguments to pass along with the event
Returns:
{sap.ui.ux3.Feeder} Reference to this in order to allow method chaining
getPlaceholderText(): string
Gets current value of property placeholderText.

This property could be used for costum placeholder. If it is not set, the default text is used.

Returns:
{string} Value of property placeholderText
getText(): string
Gets current value of property text.

The text for the Feeder. @References are supported.

Returns:
{string} Value of property text
getThumbnailSrc(): sap.ui.core.URI
Gets current value of property thumbnailSrc.

URL to the thumb nail image This property is optional if the feeder is a sub-control of a feed or a feedChunk control. In this case the value of the feed or feddChunk control is used if it's not set. So it must be only set once on the feed or feedChunk control.

Returns:
{sap.ui.core.URI} Value of property thumbnailSrc
Gets current value of property type.

Type and size of the Feeder

Default value is Large.

Returns:
{sap.ui.ux3.FeederType} Value of property type
setPlaceholderText(sPlaceholderText): sap.ui.ux3.Feeder
Sets a new value for property placeholderText.

This property could be used for costum placeholder. If it is not set, the default text is used.

When called with a value of null or undefined, the default value of the property will be restored.

Parameters:
{string}sPlaceholderText New value for property placeholderText
Returns:
{sap.ui.ux3.Feeder} Reference to this in order to allow method chaining
setText(sText): sap.ui.ux3.Feeder
Sets a new value for property text.

The text for the Feeder. @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:
{sap.ui.ux3.Feeder} Reference to this in order to allow method chaining
setThumbnailSrc(sThumbnailSrc): sap.ui.ux3.Feeder
Sets a new value for property thumbnailSrc.

URL to the thumb nail image This property is optional if the feeder is a sub-control of a feed or a feedChunk control. In this case the value of the feed or feddChunk control is used if it's not set. So it must be only set once on the feed or feedChunk control.

When called with a value of null or undefined, the default value of the property will be restored.

Parameters:
{sap.ui.core.URI}sThumbnailSrc New value for property thumbnailSrc
Returns:
{sap.ui.ux3.Feeder} Reference to this in order to allow method chaining
setType(sType): sap.ui.ux3.Feeder
Sets a new value for property type.

Type and size of the Feeder

When called with a value of null or undefined, the default value of the property will be restored.

Default value is Large.

Parameters:
{sap.ui.ux3.FeederType}sType New value for property type
Returns:
{sap.ui.ux3.Feeder} Reference to this in order to allow method chaining