Class sap.m.SuggestionItemModule: sap/m/SuggestionItem

extends Item

Display suggestion list items.


Since: 1.34.
Constructor Summary
new sap.m.SuggestionItem(sId?, mSettings?)Constructor for a new SuggestionItem.
Method Summary
sap.m.SuggestionItem.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.m.SuggestionItem with name sClassName and enriches it with the information contained in oClassInfo.
sap.m.SuggestionItem.getMetadata()Returns a metadata object for class sap.m.SuggestionItem.
getDescription()Gets current value of property description.
getIcon()Gets current value of property icon.
getSuggestionText()Return suggestion text.
render(oRenderManager, oItem, sSearch, bSelected)Produces the HTML of the suggestion item and writes it to render-output-buffer.
setDescription(sDescription)Sets a new value for property description.
setIcon(sIcon)Sets a new value for property icon.
Constructor Detail
new sap.m.SuggestionItem(sId?, mSettings?)
Constructor for a new SuggestionItem.

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.Item 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
Method Detail
sap.m.SuggestionItem.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.m.SuggestionItem 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.Item.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.m.SuggestionItem.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.m.SuggestionItem.
Returns:
{sap.ui.base.Metadata} Metadata object describing this class
getDescription(): string
Gets current value of property description.

Additional text of type string, optionally to be displayed along with this item.

Default value is .

Returns:
{string} Value of property description
getIcon(): string
Gets current value of property icon.

The icon belonging to this list item instance. This can be an URI to an image or an icon font URI.

Default value is .

Returns:
{string} Value of property icon
getSuggestionText(): string
Return suggestion text. By default, it is the value of the text property.

Subclasses may override this function.

Returns:
{string} suggestion text.
render(oRenderManager, oItem, sSearch, bSelected)
Produces the HTML of the suggestion item and writes it to render-output-buffer.

Subclasses may override this function.

Parameters:
{sap.ui.core.RenderManager}oRenderManager The RenderManager
{sap.m.SuggestionItem}oItem The item which should be rendered
{string}sSearch The search text that should be emphasized
{boolean}bSelected The item is selected
setDescription(sDescription): sap.m.SuggestionItem
Sets a new value for property description.

Additional text of type string, optionally to be displayed along with this item.

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

Default value is .

Parameters:
{string}sDescription New value for property description
Returns:
{sap.m.SuggestionItem} Reference to this in order to allow method chaining
setIcon(sIcon): sap.m.SuggestionItem
Sets a new value for property icon.

The icon belonging to this list item instance. This can be an URI to an image or an icon font URI.

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

Default value is .

Parameters:
{string}sIcon New value for property icon
Returns:
{sap.m.SuggestionItem} Reference to this in order to allow method chaining