The Feed Input allows the user to enter text for a new feed entry and then post it.
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#constructor for a general description of the syntax of the settings object.
new sap.m.FeedInput(sId?, mSettings?)
Param | Type | Default Value | Description |
---|---|---|---|
sId? | string | id for the new control, generated automatically if no id is given |
|
mSettings? | object | initial settings for the new control |
Name | Type | Default Value | Description |
---|---|---|---|
ariaLabelForPicture | string | Text for Picture which will be read by screenreader. If a new ariaLabelForPicture is set, any previously set ariaLabelForPicture is deactivated. Deprecated as of version 1.88. This will not have any effect in code now. Visibility: public |
|
buttonTooltip | sap.ui.core.TooltipBase | Submit | 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. |
enabled | boolean | true | Set this flag to "false" to disable both text input and post button. Visibility: public |
growing | boolean | false | Indicates the ability of the control to automatically grow and shrink dynamically with its content. Visibility: public |
growingMaxLines | int | 0 | Defines the maximum number of lines that the control can grow. Value is set to 0 by default, which means an unlimited numbers of rows. Note: Minimum value to set is equal to the |
icon | sap.ui.core.URI | Icon to be displayed as a graphical element within the feed input. This can be an image or an icon from the icon font. Visibility: public |
|
iconDensityAware | boolean | true | 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. Deprecated as of version 1.88. Image is replaced by avatar. Visibility: public |
iconDisplayShape | sap.m.AvatarShape | Circle | Defines the shape of the icon. |
iconInitials | string | empty string | Defines the initials of the icon. |
iconSize | sap.m.AvatarSize | M | Defines the size of the icon. |
maxLength | int | 0 | The maximum length (the maximum number of characters) for the feed's input value. By default this is not limited. Visibility: public |
placeholder | string | Post something here | The placeholder text shown in the input area as long as the user has not entered any text value. Visibility: public |
rows | int | 2 | Defines the number of visible text lines for the control. Note: Minimum value is 2, maximum value is 15. Visibility: public |
showExceededText | boolean | false | Determines whether the characters, exceeding the maximum allowed character count, are visible in the input field. If set to |
showIcon | boolean | true | 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 Visibility: public |
value | string | The text value of the feed input. As long as the user has not entered any text the post button is disabled Visibility: public |
Default Aggregation:
Name | Cardinality | Type | Description |
---|---|---|---|
_avatar | 0..1 | sap.m.Avatar |
Defines the inner avatar control. |
Event | Description |
---|---|
post |
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. |
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.
Param | Type | Description |
---|---|---|
oControlEvent | sap.ui.base.Event | |
getSource | sap.ui.base.EventProvider | |
getParameters | object | |
value | string |
The value of the feed input before reseting it. |
Method | Description |
---|---|
attachPost |
Attaches event handler When called, the context of the event handler (its 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. |
detachPost |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
sap.m.FeedInput.extend |
Creates a new subclass of class sap.m.FeedInput with name
|
firePost |
Fires event post to attached listeners. |
getAriaLabelForPicture |
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. Deprecated as of version 1.88. This will not have any effect in code now. |
getButtonTooltip |
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 |
getEnabled |
Gets current value of property enabled. Set this flag to "false" to disable both text input and post button. Default value is |
getGrowing |
Gets current value of property growing. Indicates the ability of the control to automatically grow and shrink dynamically with its content. Default value is |
getGrowingMaxLines |
Gets current value of property growingMaxLines. Defines the maximum number of lines that the control can grow. Value is set to 0 by default, which means an unlimited numbers of rows. Note: Minimum value to set is equal to the Default value is |
getIcon |
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. |
getIconDensityAware |
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. Deprecated as of version 1.88. Image is replaced by avatar. Default value is |
getIconDisplayShape |
Gets current value of property iconDisplayShape. Defines the shape of the icon. Default value is |
getIconInitials |
Gets current value of property iconInitials. Defines the initials of the icon. Default value is |
getIconSize |
Gets current value of property iconSize. Defines the size of the icon. Default value is |
getMaxLength |
Gets current value of property maxLength. The maximum length (the maximum number of characters) for the feed's input value. By default this is not limited. Default value is |
sap.m.FeedInput.getMetadata |
Returns a metadata object for class sap.m.FeedInput. |
getPlaceholder |
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 |
getRows |
Gets current value of property rows. Defines the number of visible text lines for the control. Note: Minimum value is 2, maximum value is 15. Default value is |
getShowExceededText |
Gets current value of property showExceededText. Determines whether the characters, exceeding the maximum allowed character count, are visible in the input field. If set to Default value is |
getShowIcon |
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 |
getValue |
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 |
setAriaLabelForPicture |
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. Deprecated as of version 1.88. This will not have any effect in code now. When called with a value of |
setButtonTooltip |
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 Default value is |
setEnabled |
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 Default value is |
setGrowing |
Sets a new value for property growing. Indicates the ability of the control to automatically grow and shrink dynamically with its content. When called with a value of Default value is |
setGrowingMaxLines |
Sets a new value for property growingMaxLines. Defines the maximum number of lines that the control can grow. Value is set to 0 by default, which means an unlimited numbers of rows. Note: Minimum value to set is equal to the When called with a value of Default value is |
setIcon |
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 |
setIconDensityAware |
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. Deprecated as of version 1.88. Image is replaced by avatar. When called with a value of Default value is |
setIconDisplayShape |
Sets a new value for property iconDisplayShape. Defines the shape of the icon. When called with a value of Default value is |
setIconInitials |
Sets a new value for property iconInitials. Defines the initials of the icon. When called with a value of Default value is |
setIconSize |
Sets a new value for property iconSize. Defines the size of the icon. When called with a value of Default value is |
setMaxLength |
Sets a new value for property maxLength. The maximum length (the maximum number of characters) for the feed's input value. By default this is not limited. When called with a value of Default value is |
setPlaceholder |
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 Default value is |
setRows |
Sets a new value for property rows. Defines the number of visible text lines for the control. Note: Minimum value is 2, maximum value is 15. When called with a value of Default value is |
setShowExceededText |
Sets a new value for property showExceededText. Determines whether the characters, exceeding the maximum allowed character count, are visible in the input field. If set to When called with a value of Default value is |
setShowIcon |
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 Default value is |
setValue |
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 |
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.
Param | Type | DefaultValue | Description |
---|---|---|---|
oData | object |
An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called when the event occurs |
|
oListener | object |
Context object to call the event handler with. Defaults to this |
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.
Param | Type | DefaultValue | Description |
---|---|---|---|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called, when the event occurs |
|
oListener | object |
Context object on which the given function had to be called |
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.
Param | Type | DefaultValue | Description |
---|---|---|---|
sClassName | string |
Name of the class being created |
|
oClassInfo | object |
Object literal with information about the class |
|
FNMetaImpl | function |
Constructor function for the metadata object; if not given, it defaults to the metadata implementation used by this class |
Fires event post to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
|
value | string |
The value of the feed input before reseting it. |
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. Deprecated as of version 1.88. This will not have any effect in code now.
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"
.
Gets current value of property enabled.
Set this flag to "false" to disable both text input and post button.
Default value is true
.
Gets current value of property growing.
Indicates the ability of the control to automatically grow and shrink dynamically with its content.
Default value is false
.
Gets current value of property growingMaxLines.
Defines the maximum number of lines that the control can grow. Value is set to 0 by default, which means an unlimited numbers of rows. Note: Minimum value to set is equal to the rows
property value, maximum value is 15.
Default value is 0
.
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.
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.
Deprecated as of version 1.88. Image is replaced by avatar.
Default value is true
.
Gets current value of property iconDisplayShape.
Defines the shape of the icon.
Default value is Circle
.
Gets current value of property iconInitials.
Defines the initials of the icon.
Default value is empty string
.
Gets current value of property iconSize.
Defines the size of the icon.
Default value is M
.
Gets current value of property maxLength.
The maximum length (the maximum number of characters) for the feed's input value. By default this is not limited.
Default value is 0
.
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"
.
Gets current value of property rows.
Defines the number of visible text lines for the control. Note: Minimum value is 2, maximum value is 15.
Default value is 2
.
Gets current value of property showExceededText.
Determines whether the characters, exceeding the maximum allowed character count, are visible in the input field.
If set to false
, the user is not allowed to enter more characters than what is set in the maxLength
property. If set to true
, the characters exceeding the maxLength
value are selected on paste and the counter below the input field displays their number.
Default value is false
.
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
.
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
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. Deprecated as of version 1.88. This will not have any effect in code now.
When called with a value of null
or undefined
, the default value of the property will be restored.
Param | Type | DefaultValue | Description |
---|---|---|---|
sAriaLabelForPicture | string |
New value for property |
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"
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sButtonTooltip | sap.ui.core.TooltipBase | "Submit" |
New value for property |
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
.
Param | Type | DefaultValue | Description |
---|---|---|---|
bEnabled | boolean | true |
New value for property |
Sets a new value for property growing.
Indicates the ability of the control to automatically grow and shrink dynamically with its content.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is false
.
Param | Type | DefaultValue | Description |
---|---|---|---|
bGrowing | boolean | false |
New value for property |
Sets a new value for property growingMaxLines.
Defines the maximum number of lines that the control can grow. Value is set to 0 by default, which means an unlimited numbers of rows. Note: Minimum value to set is equal to the rows
property value, maximum value is 15.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is 0
.
Param | Type | DefaultValue | Description |
---|---|---|---|
iGrowingMaxLines | int | 0 |
New value for property |
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.
Param | Type | DefaultValue | Description |
---|---|---|---|
sIcon | sap.ui.core.URI |
New value for property |
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.
Deprecated as of version 1.88. Image is replaced by avatar.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is true
.
Param | Type | DefaultValue | Description |
---|---|---|---|
bIconDensityAware | boolean | true |
New value for property |
Sets a new value for property iconDisplayShape.
Defines the shape of the icon.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is Circle
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sIconDisplayShape | sap.m.AvatarShape | Circle |
New value for property |
Sets a new value for property iconInitials.
Defines the initials of the icon.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is empty string
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sIconInitials | string | "" |
New value for property |
Sets a new value for property iconSize.
Defines the size of the icon.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is M
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sIconSize | sap.m.AvatarSize | M |
New value for property |
Sets a new value for property maxLength.
The maximum length (the maximum number of characters) for the feed's input 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
.
Param | Type | DefaultValue | Description |
---|---|---|---|
iMaxLength | int | 0 |
New value for property |
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"
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sPlaceholder | string | "Post something here" |
New value for property |
Sets a new value for property rows.
Defines the number of visible text lines for the control. Note: Minimum value is 2, maximum value is 15.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is 2
.
Param | Type | DefaultValue | Description |
---|---|---|---|
iRows | int | 2 |
New value for property |
Sets a new value for property showExceededText.
Determines whether the characters, exceeding the maximum allowed character count, are visible in the input field.
If set to false
, the user is not allowed to enter more characters than what is set in the maxLength
property. If set to true
, the characters exceeding the maxLength
value are selected on paste and the counter below the input field displays their number.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is false
.
Param | Type | DefaultValue | Description |
---|---|---|---|
bShowExceededText | boolean | false |
New value for property |
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
.
Param | Type | DefaultValue | Description |
---|---|---|---|
bShowIcon | boolean | true |
New value for property |
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.
Param | Type | DefaultValue | Description |
---|---|---|---|
sValue | string |
New value for property |