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 |
Returns a metadata object for class sap.ui.comp.odata.FieldSelector.
Returns:
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:
Destroys the inner references
Destroys the content in the aggregation content
.
Returns:
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:
exit()
Cleans up the control
Fires event fieldSelectionChanged
to attached listeners.
Parameters:
{Map} | mArguments? | The arguments to pass along with the event |
Returns:
Gets content of aggregation
content
.
Content of the control itself
Returns:
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 |
Sets the aggregated content
.
Parameters:
Returns:
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 |
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:
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 |