Class sap.ui.comp.odata.FieldSelectorModule: sap/ui/comp/odata/FieldSelector

extends Control

Reuse control which displays the properties of OData entity sets.

Constructor Summary
new sap.ui.comp.odata.FieldSelector(sId?, mSettings?)Constructor for a new odata/FieldSelector.
Event Summary
fieldSelectionChanged(oControlEvent)User selected a different field.
Events borrowed from class sap.ui.core.Control
Method Summary
sap.ui.comp.odata.FieldSelector.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.ui.comp.odata.FieldSelector with name sClassName and enriches it with the information contained in oClassInfo.
sap.ui.comp.odata.FieldSelector.getMetadata()Returns a metadata object for class sap.ui.comp.odata.FieldSelector.
attachFieldSelectionChanged(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the fieldSelectionChanged event of this sap.ui.comp.odata.FieldSelector.
destroy()Destroys the inner references
destroyContent()Destroys the content in the aggregation content.
detachFieldSelectionChanged(fnFunction, oListener)Detaches event handler fnFunction from the fieldSelectionChanged event of this sap.ui.comp.odata.FieldSelector.
exit()Cleans up the control
fireFieldSelectionChanged(mArguments?)Fires event fieldSelectionChanged to attached listeners.
getContent()Gets content of aggregation content.
getSelectedField()Returns a map with the name of the entity set and the key of the selected field.
getShowSearchBar()Gets current value of property showSearchBar.
setContent(oContent)Sets the aggregated content.
setModel(oModel, sEntityTypes, bShowExtFieldButton, aIgnoredFields, mBindingPathToFieldListElement, mIdToFieldListElement)Set the model for the entity and fields of an odata service
setShowSearchBar(bShowSearchBar)Sets a new value for property showSearchBar.
updateFieldLabel(oFieldListElement)Based on the renamed label contained in the field list, the label contained in the field selector will be updated.
Constructor Detail
new sap.ui.comp.odata.FieldSelector(sId?, mSettings?)
Constructor for a new odata/FieldSelector.

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
  • Aggregations
  • Events
    • fieldSelectionChanged : 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.

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
fieldSelectionChanged(oControlEvent)
User selected a different field.
Parameters:
{sap.ui.base.Event}oControlEvent
{sap.ui.base.EventProvider}oControlEvent.getSource
{object}oControlEvent.getParameters
Method Detail
sap.ui.comp.odata.FieldSelector.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.ui.comp.odata.FieldSelector 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.ui.comp.odata.FieldSelector.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.ui.comp.odata.FieldSelector.
Returns:
{sap.ui.base.Metadata} Metadata object describing this class
attachFieldSelectionChanged(oData?, fnFunction, oListener?): sap.ui.comp.odata.FieldSelector
Attaches event handler fnFunction to the fieldSelectionChanged event of this sap.ui.comp.odata.FieldSelector.

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.ui.comp.odata.FieldSelector itself.

User selected a different field.

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.ui.comp.odata.FieldSelector itself
Returns:
{sap.ui.comp.odata.FieldSelector} Reference to this in order to allow method chaining
Destroys the inner references
Destroys the content in the aggregation content.
Returns:
{sap.ui.comp.odata.FieldSelector} Reference to this in order to allow method chaining
detachFieldSelectionChanged(fnFunction, oListener): sap.ui.comp.odata.FieldSelector
Detaches event handler fnFunction from the fieldSelectionChanged event of this sap.ui.comp.odata.FieldSelector.

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.ui.comp.odata.FieldSelector} Reference to this in order to allow method chaining
exit()
Cleans up the control
fireFieldSelectionChanged(mArguments?): sap.ui.comp.odata.FieldSelector
Fires event fieldSelectionChanged to attached listeners.
Parameters:
{Map}mArguments? The arguments to pass along with the event
Returns:
{sap.ui.comp.odata.FieldSelector} Reference to this in order to allow method chaining
getContent(): sap.ui.core.Control
Gets content of aggregation content.

Content of the control itself

Returns:
{sap.ui.core.Control}
getSelectedField(): object
Returns a map with the name of the entity set and the key of the selected field.
Returns:
{object} map of the name of the entity set having the selected field as kex
getShowSearchBar(): boolean
Gets current value of property showSearchBar.

Indicates to show a search bar for property names inside a selected entity set.

Default value is true.

Returns:
{boolean} Value of property showSearchBar
setContent(oContent): sap.ui.comp.odata.FieldSelector
Sets the aggregated content.
Parameters:
{sap.ui.core.Control}oContent The content to set
Returns:
{sap.ui.comp.odata.FieldSelector} Reference to this in order to allow method chaining
setModel(oModel, sEntityTypes, bShowExtFieldButton, aIgnoredFields, mBindingPathToFieldListElement, mIdToFieldListElement)
Set the model for the entity and fields of an odata service
Parameters:
{sap.ui.model.odata.ODataModel}oModel odata model
{string}sEntityTypes entity type name(s) separated by comma character or array
{boolean}bShowExtFieldButton indicates if the create new field button will be displayed or not
{Array}aIgnoredFields List of fields which should be ignored
{Object.}mBindingPathToFieldListElement Map absolute odata binding paths to the field list elements
{Object.}mIdToFieldListElement Map field list element ids to the field list elements
setShowSearchBar(bShowSearchBar): sap.ui.comp.odata.FieldSelector
Sets a new value for property showSearchBar.

Indicates to show a search bar for property names inside a selected entity set.

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

Default value is true.

Parameters:
{boolean}bShowSearchBar New value for property showSearchBar
Returns:
{sap.ui.comp.odata.FieldSelector} Reference to this in order to allow method chaining
updateFieldLabel(oFieldListElement)
Based on the renamed label contained in the field list, the label contained in the field selector will be updated.
Parameters:
{Object}oFieldListElement Field list element containing all relevant properties needed for the update