Class sap.m.SearchFieldModule: sap/m/SearchField

extends Control

Enables users to input a search string.

Constructor Summary
new sap.m.SearchField(sId?, mSettings?)Constructor for a new SearchField.
Event Summary
liveChange(oControlEvent)This event is fired when the value of the search field is changed by a user - e.g.
search(oControlEvent)Event which is fired when the user triggers a search.
suggest(oControlEvent)This event is fired when the search field is initially focused or its value is changed by the user.
Events borrowed from class sap.ui.core.Control
Method Summary
sap.m.SearchField.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.m.SearchField with name sClassName and enriches it with the information contained in oClassInfo.
sap.m.SearchField.getMetadata()Returns a metadata object for class sap.m.SearchField.
addAriaDescribedBy(vAriaDescribedBy)Adds some ariaDescribedBy into the association ariaDescribedBy.
addAriaLabelledBy(vAriaLabelledBy)Adds some ariaLabelledBy into the association ariaLabelledBy.
addSuggestionItem(oSuggestionItem)Adds some suggestionItem to the aggregation suggestionItems.
attachLiveChange(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the liveChange event of this sap.m.SearchField.
attachSearch(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the search event of this sap.m.SearchField.
attachSuggest(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the suggest event of this sap.m.SearchField.
bindValue(oBindingInfo)Binds property value to model data.
destroySuggestionItems()Destroys all the suggestionItems in the aggregation suggestionItems.
detachLiveChange(fnFunction, oListener)Detaches event handler fnFunction from the liveChange event of this sap.m.SearchField.
detachSearch(fnFunction, oListener)Detaches event handler fnFunction from the search event of this sap.m.SearchField.
detachSuggest(fnFunction, oListener)Detaches event handler fnFunction from the suggest event of this sap.m.SearchField.
fireLiveChange(mArguments?)Fires event liveChange to attached listeners.
fireSearch(mArguments?)Fires event search to attached listeners.
fireSuggest(mArguments?)Fires event suggest to attached listeners.
getAriaDescribedBy()Returns array of IDs of the elements which are the current targets of the association ariaDescribedBy.
getAriaLabelledBy()Returns array of IDs of the elements which are the current targets of the association ariaLabelledBy.
getEnabled()Gets current value of property enabled.
getEnableSuggestions()Gets current value of property enableSuggestions.
getMaxLength()Gets current value of property maxLength.
getPlaceholder()Gets current value of property placeholder.
getPopupAnchorDomRef()Function returns DOM element which acts as reference point for the opening suggestion menu
getRefreshButtonTooltip()Gets current value of property refreshButtonTooltip.
getShowRefreshButton()Gets current value of property showRefreshButton.
getShowSearchButton()Gets current value of property showSearchButton.
getSuggestionItems()Gets content of aggregation suggestionItems.
getValue()Gets current value of property value.
getVisible()Gets current value of property visible.
getWidth()Gets current value of property width.
indexOfSuggestionItem(oSuggestionItem)Checks for the provided sap.m.SuggestionItem in the aggregation suggestionItems.
insertSuggestionItem(oSuggestionItem, iIndex)Inserts a suggestionItem into the aggregation suggestionItems.
removeAllAriaDescribedBy()Removes all the controls in the association named ariaDescribedBy.
removeAllAriaLabelledBy()Removes all the controls in the association named ariaLabelledBy.
removeAllSuggestionItems()Removes all the controls from the aggregation suggestionItems.
removeAriaDescribedBy(vAriaDescribedBy)Removes an ariaDescribedBy from the association named ariaDescribedBy.
removeAriaLabelledBy(vAriaLabelledBy)Removes an ariaLabelledBy from the association named ariaLabelledBy.
removeSuggestionItem(vSuggestionItem)Removes a suggestionItem from the aggregation suggestionItems.
setEnabled(bEnabled)Sets a new value for property enabled.
setEnableSuggestions(bEnableSuggestions)Sets a new value for property enableSuggestions.
setMaxLength(iMaxLength)Sets a new value for property maxLength.
setPlaceholder(sPlaceholder)Sets a new value for property placeholder.
setRefreshButtonTooltip(sRefreshButtonTooltip)Sets a new value for property refreshButtonTooltip.
setShowRefreshButton(bShowRefreshButton)Sets a new value for property showRefreshButton.
setShowSearchButton(bShowSearchButton)Sets a new value for property showSearchButton.
setValue(sValue)Sets a new value for property value.
setVisible(bVisible)Sets a new value for property visible.
setWidth(sWidth)Sets a new value for property width.
suggest(bShow)Toggle visibility of the suggestion list.
unbindValue()Unbinds property value from model data.
getSelectOnFocus()Gets current value of property selectOnFocus.
getShowMagnifier()Gets current value of property showMagnifier.
setSelectOnFocus(bSelectOnFocus)Sets a new value for property selectOnFocus.
setShowMagnifier(bShowMagnifier)Sets a new value for property showMagnifier.
Constructor Detail
new sap.m.SearchField(sId?, mSettings?)
Constructor for a new SearchField.

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:
{string}sId? id for the new control, generated automatically if no id is given
{object}mSettings? initial settings for the new control
Event Detail
liveChange(oControlEvent)
This event is fired when the value of the search field is changed by a user - e.g. at each key press. Do not invalidate or re-render a focused search field, especially during the liveChange event.
Parameters:
{sap.ui.base.Event}oControlEvent
{sap.ui.base.EventProvider}oControlEvent.getSource
{object}oControlEvent.getParameters
{string}oControlEvent.getParameters.newValue Current search string.
Since:
1.9.1
search(oControlEvent)
Event which is fired when the user triggers a search.
Parameters:
{sap.ui.base.Event}oControlEvent
{sap.ui.base.EventProvider}oControlEvent.getSource
{object}oControlEvent.getParameters
{string}oControlEvent.getParameters.query The search query string.
{sap.m.SuggestionItem}oControlEvent.getParameters.suggestionItem Suggestion list item in case if the user has selected an item from the suggestions list.
{boolean}oControlEvent.getParameters.refreshButtonPressed Indicates if the user pressed the refresh icon.
{boolean}oControlEvent.getParameters.clearButtonPressed Indicates if the user pressed the clear icon.
suggest(oControlEvent)
This event is fired when the search field is initially focused or its value is changed by the user. This event means that suggestion data should be updated, in case if suggestions are used. Use the value parameter to create new suggestions for it.
Parameters:
{sap.ui.base.Event}oControlEvent
{sap.ui.base.EventProvider}oControlEvent.getSource
{object}oControlEvent.getParameters
{string}oControlEvent.getParameters.suggestValue Current search string of the search field.
Since:
1.34
Method Detail
sap.m.SearchField.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.m.SearchField 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.m.SearchField.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.m.SearchField.
Returns:
{sap.ui.base.Metadata} Metadata object describing this class
addAriaDescribedBy(vAriaDescribedBy): sap.m.SearchField
Adds some ariaDescribedBy into the association ariaDescribedBy.
Parameters:
{string|sap.ui.core.Control}vAriaDescribedBy the ariaDescribedBy to add; if empty, nothing is inserted
Returns:
{sap.m.SearchField} Reference to this in order to allow method chaining
addAriaLabelledBy(vAriaLabelledBy): sap.m.SearchField
Adds some ariaLabelledBy into the association ariaLabelledBy.
Parameters:
{string|sap.ui.core.Control}vAriaLabelledBy the ariaLabelledBy to add; if empty, nothing is inserted
Returns:
{sap.m.SearchField} Reference to this in order to allow method chaining
addSuggestionItem(oSuggestionItem): sap.m.SearchField
Adds some suggestionItem to the aggregation suggestionItems.
Parameters:
{sap.m.SuggestionItem}oSuggestionItem the suggestionItem to add; if empty, nothing is inserted
Since:
1.34
Returns:
{sap.m.SearchField} Reference to this in order to allow method chaining
attachLiveChange(oData?, fnFunction, oListener?): sap.m.SearchField
Attaches event handler fnFunction to the liveChange event of this sap.m.SearchField.

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

This event is fired when the value of the search field is changed by a user - e.g. at each key press. Do not invalidate or re-render a focused search field, especially during the liveChange event.

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.m.SearchField itself
Since:
1.9.1
Returns:
{sap.m.SearchField} Reference to this in order to allow method chaining
attachSearch(oData?, fnFunction, oListener?): sap.m.SearchField
Attaches event handler fnFunction to the search event of this sap.m.SearchField.

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

Event which is fired when the user triggers a search.

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.m.SearchField itself
Returns:
{sap.m.SearchField} Reference to this in order to allow method chaining
attachSuggest(oData?, fnFunction, oListener?): sap.m.SearchField
Attaches event handler fnFunction to the suggest event of this sap.m.SearchField.

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

This event is fired when the search field is initially focused or its value is changed by the user. This event means that suggestion data should be updated, in case if suggestions are used. Use the value parameter to create new suggestions for it.

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.m.SearchField itself
Since:
1.34
Returns:
{sap.m.SearchField} Reference to this in order to allow method chaining
bindValue(oBindingInfo): sap.m.SearchField
Binds property value to model data.

See ManagedObject.bindProperty for a detailed description of the possible properties of oBindingInfo

Parameters:
{object}oBindingInfo The binding information
Returns:
{sap.m.SearchField} Reference to this in order to allow method chaining
destroySuggestionItems(): sap.m.SearchField
Destroys all the suggestionItems in the aggregation suggestionItems.
Since:
1.34
Returns:
{sap.m.SearchField} Reference to this in order to allow method chaining
detachLiveChange(fnFunction, oListener): sap.m.SearchField
Detaches event handler fnFunction from the liveChange event of this sap.m.SearchField.

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
Since:
1.9.1
Returns:
{sap.m.SearchField} Reference to this in order to allow method chaining
detachSearch(fnFunction, oListener): sap.m.SearchField
Detaches event handler fnFunction from the search event of this sap.m.SearchField.

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.m.SearchField} Reference to this in order to allow method chaining
detachSuggest(fnFunction, oListener): sap.m.SearchField
Detaches event handler fnFunction from the suggest event of this sap.m.SearchField.

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
Since:
1.34
Returns:
{sap.m.SearchField} Reference to this in order to allow method chaining
fireLiveChange(mArguments?): sap.m.SearchField
Fires event liveChange to attached listeners.

Expects the following event parameters:

  • newValue of type stringCurrent search string.
Parameters:
{Map}mArguments? The arguments to pass along with the event
Since:
1.9.1
Returns:
{sap.m.SearchField} Reference to this in order to allow method chaining
fireSearch(mArguments?): sap.m.SearchField
Fires event search to attached listeners.

Expects the following event parameters:

  • query of type stringThe search query string.
  • suggestionItem of type sap.m.SuggestionItemSuggestion list item in case if the user has selected an item from the suggestions list.
  • refreshButtonPressed of type booleanIndicates if the user pressed the refresh icon.
  • clearButtonPressed of type booleanIndicates if the user pressed the clear icon.
Parameters:
{Map}mArguments? The arguments to pass along with the event
Returns:
{sap.m.SearchField} Reference to this in order to allow method chaining
fireSuggest(mArguments?): sap.m.SearchField
Fires event suggest to attached listeners.

Expects the following event parameters:

  • suggestValue of type stringCurrent search string of the search field.
Parameters:
{Map}mArguments? The arguments to pass along with the event
Since:
1.34
Returns:
{sap.m.SearchField} Reference to this in order to allow method chaining
getAriaDescribedBy(): sap.ui.core.Control[]
Returns array of IDs of the elements which are the current targets of the association ariaDescribedBy.
Returns:
{sap.ui.core.Control[]}
getAriaLabelledBy(): sap.ui.core.Control[]
Returns array of IDs of the elements which are the current targets of the association ariaLabelledBy.
Returns:
{sap.ui.core.Control[]}
getEnabled(): boolean
Gets current value of property enabled.

Boolean property to enable the control (default is true).

Default value is true.

Returns:
{boolean} Value of property enabled
getEnableSuggestions(): boolean
Gets current value of property enableSuggestions.

If true, a suggest event is fired when user types in the input and when the input is focused. On a phone device, a full screen dialog with suggestions is always shown even if the suggestions list is empty.

Default value is false.

Since:
1.34
Returns:
{boolean} Value of property enableSuggestions
getMaxLength(): int
Gets current value of property maxLength.

Maximum number of characters. Value '0' means the feature is switched off.

Default value is 0.

Returns:
{int} Value of property maxLength
getPlaceholder(): string
Gets current value of property placeholder.

Text shown when no value available. Default placeholder text is the word "Search" in the current local language (if supported) or in English.

Returns:
{string} Value of property placeholder
getPopupAnchorDomRef(): domRef
Function returns DOM element which acts as reference point for the opening suggestion menu
Since:
1.34
Returns:
{domRef} the DOM element at which to open the suggestion list
getRefreshButtonTooltip(): string
Gets current value of property refreshButtonTooltip.

Tooltip text of the refresh button. If it is not set, the tooltip of the SearchField (if any) is displayed. Tooltips are not displayed on touch devices.

Since:
1.16
Returns:
{string} Value of property refreshButtonTooltip
getShowRefreshButton(): boolean
Gets current value of property showRefreshButton.

Set to true to display a refresh button in place of the search icon. By pressing the refresh button or F5 key on keyboard, the user can reload the results list without changing the search string.

Default value is false.

Since:
1.16
Returns:
{boolean} Value of property showRefreshButton
getShowSearchButton(): boolean
Gets current value of property showSearchButton.

Set to true to show the search button with the magnifier icon. If false, both the search and refresh buttons are not displayed even if the "showRefreshButton" property is true.

Default value is true.

Since:
1.23
Returns:
{boolean} Value of property showSearchButton
getSuggestionItems(): sap.m.SuggestionItem[]
Gets content of aggregation suggestionItems.

SuggestionItems are the items which will be shown in the suggestions list. The following properties can be used:

  • key is not displayed and may be used as internal technical field
  • text is displayed as normal suggestion text
  • icon
  • description - additional text may be used to visually display search item type or category
Since:
1.34
Returns:
{sap.m.SuggestionItem[]}
getValue(): string
Gets current value of property value.

Input Value.

Returns:
{string} Value of property value
getVisible(): boolean
Gets current value of property visible.

Invisible inputs are not rendered.

Default value is true.

Returns:
{boolean} Value of property visible
getWidth(): sap.ui.core.CSSSize
Gets current value of property width.

Defines the CSS width of the input. If not set, width is 100%.

Returns:
{sap.ui.core.CSSSize} Value of property width
indexOfSuggestionItem(oSuggestionItem): int
Checks for the provided sap.m.SuggestionItem in the aggregation suggestionItems. and returns its index if found or -1 otherwise.
Parameters:
{sap.m.SuggestionItem}oSuggestionItem The suggestionItem whose index is looked for
Since:
1.34
Returns:
{int} The index of the provided control in the aggregation if found, or -1 otherwise
insertSuggestionItem(oSuggestionItem, iIndex): sap.m.SearchField
Inserts a suggestionItem into the aggregation suggestionItems.
Parameters:
{sap.m.SuggestionItem}oSuggestionItem the suggestionItem to insert; if empty, nothing is inserted
{int}iIndex the 0-based index the suggestionItem should be inserted at; for a negative value of iIndex, the suggestionItem is inserted at position 0; for a value greater than the current size of the aggregation, the suggestionItem is inserted at the last position
Since:
1.34
Returns:
{sap.m.SearchField} Reference to this in order to allow method chaining
removeAllAriaDescribedBy(): sap.ui.core.Control[]
Removes all the controls in the association named ariaDescribedBy.
Returns:
{sap.ui.core.Control[]} An array of the removed elements (might be empty)
removeAllAriaLabelledBy(): sap.ui.core.Control[]
Removes all the controls in the association named ariaLabelledBy.
Returns:
{sap.ui.core.Control[]} An array of the removed elements (might be empty)
removeAllSuggestionItems(): sap.m.SuggestionItem[]
Removes all the controls from the aggregation suggestionItems.

Additionally, it unregisters them from the hosting UIArea.

Since:
1.34
Returns:
{sap.m.SuggestionItem[]} An array of the removed elements (might be empty)
removeAriaDescribedBy(vAriaDescribedBy): sap.ui.core.Control
Removes an ariaDescribedBy from the association named ariaDescribedBy.
Parameters:
{int|string|sap.ui.core.Control}vAriaDescribedBy The ariaDescribedByto be removed or its index or ID
Returns:
{sap.ui.core.Control} the removed ariaDescribedBy or null
removeAriaLabelledBy(vAriaLabelledBy): sap.ui.core.Control
Removes an ariaLabelledBy from the association named ariaLabelledBy.
Parameters:
{int|string|sap.ui.core.Control}vAriaLabelledBy The ariaLabelledByto be removed or its index or ID
Returns:
{sap.ui.core.Control} the removed ariaLabelledBy or null
removeSuggestionItem(vSuggestionItem): sap.m.SuggestionItem
Removes a suggestionItem from the aggregation suggestionItems.
Parameters:
{int|string|sap.m.SuggestionItem}vSuggestionItem The suggestionItemto remove or its index or id
Since:
1.34
Returns:
{sap.m.SuggestionItem} The removed suggestionItem or null
setEnabled(bEnabled): sap.m.SearchField
Sets a new value for property enabled.

Boolean property to enable the control (default is true).

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

Default value is true.

Parameters:
{boolean}bEnabled New value for property enabled
Returns:
{sap.m.SearchField} Reference to this in order to allow method chaining
setEnableSuggestions(bEnableSuggestions): sap.m.SearchField
Sets a new value for property enableSuggestions.

If true, a suggest event is fired when user types in the input and when the input is focused. On a phone device, a full screen dialog with suggestions is always shown even if the suggestions list is empty.

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

Default value is false.

Parameters:
{boolean}bEnableSuggestions New value for property enableSuggestions
Since:
1.34
Returns:
{sap.m.SearchField} Reference to this in order to allow method chaining
setMaxLength(iMaxLength): sap.m.SearchField
Sets a new value for property maxLength.

Maximum number of characters. Value '0' means the feature is switched off.

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

Default value is 0.

Parameters:
{int}iMaxLength New value for property maxLength
Returns:
{sap.m.SearchField} Reference to this in order to allow method chaining
setPlaceholder(sPlaceholder): sap.m.SearchField
Sets a new value for property placeholder.

Text shown when no value available. Default placeholder text is the word "Search" in the current local language (if supported) or in English.

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

Parameters:
{string}sPlaceholder New value for property placeholder
Returns:
{sap.m.SearchField} Reference to this in order to allow method chaining
setRefreshButtonTooltip(sRefreshButtonTooltip): sap.m.SearchField
Sets a new value for property refreshButtonTooltip.

Tooltip text of the refresh button. If it is not set, the tooltip of the SearchField (if any) is displayed. Tooltips are not displayed on touch devices.

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

Parameters:
{string}sRefreshButtonTooltip New value for property refreshButtonTooltip
Since:
1.16
Returns:
{sap.m.SearchField} Reference to this in order to allow method chaining
setShowRefreshButton(bShowRefreshButton): sap.m.SearchField
Sets a new value for property showRefreshButton.

Set to true to display a refresh button in place of the search icon. By pressing the refresh button or F5 key on keyboard, the user can reload the results list without changing the search string.

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

Default value is false.

Parameters:
{boolean}bShowRefreshButton New value for property showRefreshButton
Since:
1.16
Returns:
{sap.m.SearchField} Reference to this in order to allow method chaining
setShowSearchButton(bShowSearchButton): sap.m.SearchField
Sets a new value for property showSearchButton.

Set to true to show the search button with the magnifier icon. If false, both the search and refresh buttons are not displayed even if the "showRefreshButton" property is true.

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

Default value is true.

Parameters:
{boolean}bShowSearchButton New value for property showSearchButton
Since:
1.23
Returns:
{sap.m.SearchField} Reference to this in order to allow method chaining
setValue(sValue): sap.m.SearchField
Sets a new value for property value.

Input Value.

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

Parameters:
{string}sValue New value for property value
Returns:
{sap.m.SearchField} Reference to this in order to allow method chaining
setVisible(bVisible): sap.m.SearchField
Sets a new value for property visible.

Invisible inputs are not rendered.

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

Default value is true.

Parameters:
{boolean}bVisible New value for property visible
Returns:
{sap.m.SearchField} Reference to this in order to allow method chaining
setWidth(sWidth): sap.m.SearchField
Sets a new value for property width.

Defines the CSS width of the input. If not set, width is 100%.

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

Parameters:
{sap.ui.core.CSSSize}sWidth New value for property width
Returns:
{sap.m.SearchField} Reference to this in order to allow method chaining
suggest(bShow): sap.m.SearchField
Toggle visibility of the suggestion list.
Parameters:
{boolean|undefined}bShow set to true to display suggestions and false to hide them. Default value is true. An empty suggestion list is not shown on desktop and tablet devices.

This method may be called only as a response to the suggest event to ensure that the suggestion list is shown at the moment when the user expects it.

Since:
1.34
Returns:
{sap.m.SearchField}this to allow method chaining
unbindValue(): sap.m.SearchField
Unbinds property value from model data.
Returns:
{sap.m.SearchField} Reference to this in order to allow method chaining
getSelectOnFocus(): boolean
Gets current value of property selectOnFocus.

Normally, search text is selected for copy when the SearchField is focused by keyboard navigation. If an application re-renders the SearchField during the liveChange event, set this property to false to disable text selection by focus.

Default value is true.

Deprecated:
Since version 1.38. This parameter is deprecated and has no effect in run time. The cursor position of a focused search field is restored after re-rendering automatically.
Since:
1.20
Returns:
{boolean} Value of property selectOnFocus
getShowMagnifier(): boolean
Gets current value of property showMagnifier.

Set to false to hide the magnifier icon.

Default value is true.

Deprecated:
Since version 1.16.0. This parameter is deprecated. Use "showSearchButton" instead.
Returns:
{boolean} Value of property showMagnifier
setSelectOnFocus(bSelectOnFocus): sap.m.SearchField
Sets a new value for property selectOnFocus.

Normally, search text is selected for copy when the SearchField is focused by keyboard navigation. If an application re-renders the SearchField during the liveChange event, set this property to false to disable text selection by focus.

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

Default value is true.

Parameters:
{boolean}bSelectOnFocus New value for property selectOnFocus
Deprecated:
Since version 1.38. This parameter is deprecated and has no effect in run time. The cursor position of a focused search field is restored after re-rendering automatically.
Since:
1.20
Returns:
{sap.m.SearchField} Reference to this in order to allow method chaining
setShowMagnifier(bShowMagnifier): sap.m.SearchField
Sets a new value for property showMagnifier.

Set to false to hide the magnifier icon.

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

Default value is true.

Parameters:
{boolean}bShowMagnifier New value for property showMagnifier
Deprecated:
Since version 1.16.0. This parameter is deprecated. Use "showSearchButton" instead.
Returns:
{sap.m.SearchField} Reference to this in order to allow method chaining