Class sap.ui.core.search.OpenSearchProviderModule: sap/ui/core/search/OpenSearchProvider

known direct subclasses: SearchProvider

A SearchProvider which uses the OpenSearch protocol (either JSON or XML).

Constructor Summary
new sap.ui.core.search.OpenSearchProvider(sId?, mSettings?)Constructor for a new search/OpenSearchProvider.
Method Summary
sap.ui.core.search.OpenSearchProvider.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.ui.core.search.OpenSearchProvider with name sClassName and enriches it with the information contained in oClassInfo.
sap.ui.core.search.OpenSearchProvider.getMetadata()Returns a metadata object for class sap.ui.core.search.OpenSearchProvider.
getSuggestType()Gets current value of property suggestType.
getSuggestUrl()Gets current value of property suggestUrl.
setSuggestType(sSuggestType)Sets a new value for property suggestType.
setSuggestUrl(sSuggestUrl)Sets a new value for property suggestUrl.
suggest(sValue, fCallback)Call this function to get suggest values from the search provider.
Constructor Detail
new sap.ui.core.search.OpenSearchProvider(sId?, mSettings?)
Constructor for a new search/OpenSearchProvider.

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.search.SearchProvider 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.ui.core.search.OpenSearchProvider.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.ui.core.search.OpenSearchProvider 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.search.SearchProvider.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.ui.core.search.OpenSearchProvider.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.ui.core.search.OpenSearchProvider.
Returns:
{sap.ui.base.Metadata} Metadata object describing this class
getSuggestType(): string
Gets current value of property suggestType.

The type of data which is provided by the given suggestUrl: either 'json' or 'xml'.

Default value is json.

Returns:
{string} Value of property suggestType
getSuggestUrl(): sap.ui.core.URI
Gets current value of property suggestUrl.

The URL for suggestions of the search provider. As placeholder for the concrete search queries '{searchTerms}' must be used. For cross domain requests maybe a proxy must be used.

Returns:
{sap.ui.core.URI} Value of property suggestUrl
setSuggestType(sSuggestType): sap.ui.core.search.OpenSearchProvider
Sets a new value for property suggestType.

The type of data which is provided by the given suggestUrl: either 'json' or 'xml'.

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

Default value is json.

Parameters:
{string}sSuggestType New value for property suggestType
Returns:
{sap.ui.core.search.OpenSearchProvider} Reference to this in order to allow method chaining
setSuggestUrl(sSuggestUrl): sap.ui.core.search.OpenSearchProvider
Sets a new value for property suggestUrl.

The URL for suggestions of the search provider. As placeholder for the concrete search queries '{searchTerms}' must be used. For cross domain requests maybe a proxy must be used.

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

Parameters:
{sap.ui.core.URI}sSuggestUrl New value for property suggestUrl
Returns:
{sap.ui.core.search.OpenSearchProvider} Reference to this in order to allow method chaining
suggest(sValue, fCallback): void
Call this function to get suggest values from the search provider. The given callback function is called with the suggest value (type 'string', 1st parameter) and an array of the suggestions (type '[string]', 2nd parameter).
Parameters:
{string}sValue The value for which suggestions are requested.
{function}fCallback The callback function which is called when the suggestions are available.