Class sap.m.FeedInputModule: sap/m/FeedInput

extends Control

The Feed Input allows the user to enter text for a new feed entry and then post it.
Since: 1.22.
Constructor Summary
new sap.m.FeedInput(sId?, mSettings?)Constructor for a new FeedInput.
Event Summary
post(oControlEvent)The Post event is triggered when the user has entered a value and pressed the post button.
Events borrowed from class sap.ui.core.Control
Method Summary
sap.m.FeedInput.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.m.FeedInput with name sClassName and enriches it with the information contained in oClassInfo.
sap.m.FeedInput.getMetadata()Returns a metadata object for class sap.m.FeedInput.
attachPost(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the post event of this sap.m.FeedInput.
detachPost(fnFunction, oListener)Detaches event handler fnFunction from the post event of this sap.m.FeedInput.
firePost(mParameters?)Fires event post to attached listeners.
getAriaLabelForPicture()Gets current value of property ariaLabelForPicture.
getButtonTooltip()Gets current value of property buttonTooltip.
getEnabled()Gets current value of property enabled.
getIcon()Gets current value of property icon.
getIconDensityAware()Gets current value of property iconDensityAware.
getMaxLength()Gets current value of property maxLength.
getPlaceholder()Gets current value of property placeholder.
getShowIcon()Gets current value of property showIcon.
getValue()Gets current value of property value.
setAriaLabelForPicture(sAriaLabelForPicture)Sets a new value for property ariaLabelForPicture.
setButtonTooltip(sButtonTooltip)Sets a new value for property buttonTooltip.
setEnabled(bEnabled)Sets a new value for property enabled.
setIcon(sIcon)Sets a new value for property icon.
setIconDensityAware(bIconDensityAware)Sets a new value for property iconDensityAware.
setMaxLength(iMaxLength)Sets a new value for property maxLength.
setPlaceholder(sPlaceholder)Sets a new value for property placeholder.
setShowIcon(bShowIcon)Sets a new value for property showIcon.
setValue(sValue)Sets a new value for property value.
Constructor Detail
new sap.m.FeedInput(sId?, mSettings?)

Constructor for a new FeedInput.

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:

In addition, all settings applicable to the base type sap.ui.core.Control can be used as well.

Parameters:
stringsId?id for the new control, generated automatically if no id is given
objectmSettings?initial settings for the new control
Event Detail
post(oControlEvent)
The Post event is triggered when the user has entered a value and pressed the post button. After firing this event, the value is reset.
Parameters:
sap.ui.base.EventoControlEvent
sap.ui.base.EventProvideroControlEvent.getSource
objectoControlEvent.getParameters
stringoControlEvent.getParameters.valueThe value of the feed input before reseting it.
Method Detail
sap.m.FeedInput.extend(sClassName, oClassInfo?, FNMetaImpl?): function

Creates a new subclass of class sap.m.FeedInput 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:
stringsClassNameName of the class being created
objectoClassInfo?Object literal with information about the class
functionFNMetaImpl?Constructor function for the metadata object; if not given, it defaults to sap.ui.core.ElementMetadata
Returns:
functionCreated class / constructor function
sap.m.FeedInput.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.m.FeedInput.
Returns:
sap.ui.base.MetadataMetadata object describing this class
attachPost(oData?, fnFunction, oListener?): sap.m.FeedInput

Attaches event handler fnFunction to the post event of this sap.m.FeedInput.

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

The Post event is triggered when the user has entered a value and pressed the post button. After firing this event, the value is reset.

Parameters:
objectoData?An application-specific payload object that will be passed to the event handler along with the event object when firing the event
functionfnFunctionThe function to be called when the event occurs
objectoListener?Context object to call the event handler with. Defaults to this sap.m.FeedInput itself
Returns:
sap.m.FeedInputReference to this in order to allow method chaining
detachPost(fnFunction, oListener): sap.m.FeedInput

Detaches event handler fnFunction from the post event of this sap.m.FeedInput.

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

Parameters:
functionfnFunctionThe function to be called, when the event occurs
objectoListenerContext object on which the given function had to be called
Returns:
sap.m.FeedInputReference to this in order to allow method chaining
firePost(mParameters?): sap.m.FeedInput
Fires event post to attached listeners.
Parameters:
objectmParameters?Parameters to pass along with the event
stringmParameters.value?The value of the feed input before reseting it.
Returns:
sap.m.FeedInputReference to this in order to allow method chaining
getAriaLabelForPicture(): string

Gets current value of property ariaLabelForPicture.

Text for Picture which will be read by screenreader. If a new ariaLabelForPicture is set, any previously set ariaLabelForPicture is deactivated.

Returns:
stringValue of property ariaLabelForPicture
Since:
1.30
getButtonTooltip(): sap.ui.core.TooltipBase

Gets current value of property buttonTooltip.

Sets a new tooltip for Submit button. The tooltip can either be a simple string (which in most cases will be rendered as the title attribute of this element) or an instance of sap.ui.core.TooltipBase. If a new tooltip is set, any previously set tooltip is deactivated. The default value is set language dependent.

Default value is Submit.

Returns:
sap.ui.core.TooltipBaseValue of property buttonTooltip
Since:
1.28
getEnabled(): boolean

Gets current value of property enabled.

Set this flag to "false" to disable both text input and post button.

Default value is true.

Returns:
booleanValue of property enabled
getIcon(): sap.ui.core.URI

Gets current value of property icon.

Icon to be displayed as a graphical element within the feed input. This can be an image or an icon from the icon font.

Returns:
sap.ui.core.URIValue of property icon
getIconDensityAware(): boolean

Gets current value of property iconDensityAware.

Some mobile devices support higher resolution images while others do not. Therefore, you should provide image resources for all relevant densities. If the property is set to "true", one or more requests are sent to the server to try and get the perfect density version of an image. If an image of a certain density is not available, the image control falls back to the default image, which should be provided.

If you do not have higher resolution images, you should set the property to "false" to avoid unnecessary round-trips.

Please be aware that this property is relevant only for images and not for icons.

Default value is true.

Returns:
booleanValue of property iconDensityAware
getMaxLength(): int

Gets current value of property maxLength.

The maximum length (the maximum number of characters) for the feed input's value. By default this is not limited.

Default value is 0.

Returns:
intValue of property maxLength
getPlaceholder(): string

Gets current value of property placeholder.

The placeholder text shown in the input area as long as the user has not entered any text value.

Default value is Post something here.

Returns:
stringValue of property placeholder
getShowIcon(): boolean

Gets current value of property showIcon.

If set to "true" (default), icons will be displayed. In case no icon is provided the standard placeholder will be displayed. if set to "false" icons are hidden

Default value is true.

Returns:
booleanValue of property showIcon
getValue(): string

Gets current value of property value.

The text value of the feed input. As long as the user has not entered any text the post button is disabled

Returns:
stringValue of property value
setAriaLabelForPicture(sAriaLabelForPicture): sap.m.FeedInput

Sets a new value for property ariaLabelForPicture.

Text for Picture which will be read by screenreader. If a new ariaLabelForPicture is set, any previously set ariaLabelForPicture is deactivated.

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

Parameters:
stringsAriaLabelForPictureNew value for property ariaLabelForPicture
Returns:
sap.m.FeedInputReference to this in order to allow method chaining
Since:
1.30
setButtonTooltip(sButtonTooltip): sap.m.FeedInput

Sets a new value for property buttonTooltip.

Sets a new tooltip for Submit button. The tooltip can either be a simple string (which in most cases will be rendered as the title attribute of this element) or an instance of sap.ui.core.TooltipBase. If a new tooltip is set, any previously set tooltip is deactivated. The default value is set language dependent.

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

Default value is Submit.

Parameters:
sap.ui.core.TooltipBasesButtonTooltipNew value for property buttonTooltip
Returns:
sap.m.FeedInputReference to this in order to allow method chaining
Since:
1.28
setEnabled(bEnabled): sap.m.FeedInput

Sets a new value for property enabled.

Set this flag to "false" to disable both text input and post button.

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

Default value is true.

Parameters:
booleanbEnabledNew value for property enabled
Returns:
sap.m.FeedInputReference to this in order to allow method chaining
setIcon(sIcon): sap.m.FeedInput

Sets a new value for property icon.

Icon to be displayed as a graphical element within the feed input. This can be an image or an icon from the icon font.

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

Parameters:
sap.ui.core.URIsIconNew value for property icon
Returns:
sap.m.FeedInputReference to this in order to allow method chaining
setIconDensityAware(bIconDensityAware): sap.m.FeedInput

Sets a new value for property iconDensityAware.

Some mobile devices support higher resolution images while others do not. Therefore, you should provide image resources for all relevant densities. If the property is set to "true", one or more requests are sent to the server to try and get the perfect density version of an image. If an image of a certain density is not available, the image control falls back to the default image, which should be provided.

If you do not have higher resolution images, you should set the property to "false" to avoid unnecessary round-trips.

Please be aware that this property is relevant only for images and not for icons.

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

Default value is true.

Parameters:
booleanbIconDensityAwareNew value for property iconDensityAware
Returns:
sap.m.FeedInputReference to this in order to allow method chaining
setMaxLength(iMaxLength): sap.m.FeedInput

Sets a new value for property maxLength.

The maximum length (the maximum number of characters) for the feed input's value. By default this is not limited.

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

Default value is 0.

Parameters:
intiMaxLengthNew value for property maxLength
Returns:
sap.m.FeedInputReference to this in order to allow method chaining
setPlaceholder(sPlaceholder): sap.m.FeedInput

Sets a new value for property placeholder.

The placeholder text shown in the input area as long as the user has not entered any text value.

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

Default value is Post something here.

Parameters:
stringsPlaceholderNew value for property placeholder
Returns:
sap.m.FeedInputReference to this in order to allow method chaining
setShowIcon(bShowIcon): sap.m.FeedInput

Sets a new value for property showIcon.

If set to "true" (default), icons will be displayed. In case no icon is provided the standard placeholder 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.

Parameters:
booleanbShowIconNew value for property showIcon
Returns:
sap.m.FeedInputReference to this in order to allow method chaining
setValue(sValue): sap.m.FeedInput

Sets a new value for property value.

The text value of the feed input. As long as the user has not entered any text the post button is disabled

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

Parameters:
stringsValueNew value for property value
Returns:
sap.m.FeedInputReference to this in order to allow method chaining