Class sap.m.FeedInputModule: sap/m/FeedInput
The Feed Input allows the user to enter text for a new feed entry and then post it.
Since: 1.22.
sClassName
and enriches it with the information contained in oClassInfo
.fnFunction
to the post
event of this sap.m.FeedInput
.fnFunction
from the post
event of this sap.m.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:
- Properties
- enabled : boolean (default: true)
- maxLength : int (default: 0)
- placeholder : string (default: Post something here)
- value : string
- icon : sap.ui.core.URI
- showIcon : boolean (default: true)
- iconDensityAware : boolean (default: true)
- buttonTooltip : sap.ui.core.TooltipBase (default: Submit)
- ariaLabelForPicture : string
- Events
- post : 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.
{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.value | The value of the feed input before reseting it. |
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.
{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 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.
{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.FeedInput itself |
{sap.m.FeedInput} | Reference to this in order to allow method chaining |
fnFunction
from the post
event of this sap.m.FeedInput
. 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.FeedInput} | Reference to this in order to allow method chaining |
post
to attached listeners. Expects the following event parameters:
value
of typestring
The value of the feed input before reseting it.
{Map} | mArguments? | The arguments to pass along with the event |
{sap.m.FeedInput} | Reference to this in order to allow method chaining |
ariaLabelForPicture
. Text for Picture which will be read by screenreader. If a new ariaLabelForPicture is set, any previously set ariaLabelForPicture is deactivated.
- Since:
- 1.30
{string} | Value of property ariaLabelForPicture |
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
.
- Since:
- 1.28
{sap.ui.core.TooltipBase} | Value of property buttonTooltip |
enabled
. Set this flag to "false" to disable both text input and post button.
Default value is true
.
{boolean} | Value of property enabled |
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.
{sap.ui.core.URI} | Value of property icon |
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
.
{boolean} | Value of property iconDensityAware |
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
.
{int} | Value of property maxLength |
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
.
{string} | Value of property placeholder |
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
.
{boolean} | Value of property showIcon |
value
. The text value of the feed input. As long as the user has not entered any text the post button is disabled
{string} | Value of property value |
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.
{string} | sAriaLabelForPicture | New value for property ariaLabelForPicture |
- Since:
- 1.30
{sap.m.FeedInput} | Reference to this in order to allow method chaining |
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
.
{sap.ui.core.TooltipBase} | sButtonTooltip | New value for property buttonTooltip |
- Since:
- 1.28
{sap.m.FeedInput} | Reference to this in order to allow method chaining |
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
.
{boolean} | bEnabled | New value for property enabled |
{sap.m.FeedInput} | Reference to this in order to allow method chaining |
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.
{sap.ui.core.URI} | sIcon | New value for property icon |
{sap.m.FeedInput} | Reference to this in order to allow method chaining |
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
.
{boolean} | bIconDensityAware | New value for property iconDensityAware |
{sap.m.FeedInput} | Reference to this in order to allow method chaining |
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
.
{int} | iMaxLength | New value for property maxLength |
{sap.m.FeedInput} | Reference to this in order to allow method chaining |
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
.
{string} | sPlaceholder | New value for property placeholder |
{sap.m.FeedInput} | Reference to this in order to allow method chaining |
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
.
{boolean} | bShowIcon | New value for property showIcon |
{sap.m.FeedInput} | Reference to this in order to allow method chaining |
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.
{string} | sValue | New value for property value |
{sap.m.FeedInput} | Reference to this in order to allow method chaining |