Class sap.ui.ux3.DataSetModule: sap/ui/ux3/DataSet

extends Control

DataSet
Deprecated API:
Since version 1.38.
Constructor Summary
new sap.ui.ux3.DataSet(sId?, mSettings?)Constructor for a new DataSet.
Event Summary
search(oControlEvent)Event which is fired when the user triggers a search
selectionChanged(oControlEvent)selection Changed
Events borrowed from class sap.ui.core.Control
Method Summary
sap.ui.ux3.DataSet.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.ui.ux3.DataSet with name sClassName and enriches it with the information contained in oClassInfo.
sap.ui.ux3.DataSet.getMetadata()Returns a metadata object for class sap.ui.ux3.DataSet.
_rerenderFilter()Rerendering of the FilterArea
_rerenderToolbar()Rerendering of the Toolbar
addFilter(oFilter)Adds some filter to the aggregation filter.
addItem(oItem)Adds some item to the aggregation items.
addToolbarItem(oOToolbarItem)add a toolbarItem to the toolbar
addView(oView)Adds some view to the aggregation views.
attachSearch(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the search event of this sap.ui.ux3.DataSet.
attachSelectionChanged(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the selectionChanged event of this sap.ui.ux3.DataSet.
bindItems(oBindingInfo)Binds aggregation items to model data.
clearSelection()clears dataset from all previous selections
createViewSwitch(oView, iIndex)Creates a view switch button
destroyFilter()Destroys all the filter in the aggregation filter.
destroyItems()Destroys all the items in the aggregation items.
destroyViews()Destroys all the views in the aggregation views.
detachSearch(fnFunction, oListener)Detaches event handler fnFunction from the search event of this sap.ui.ux3.DataSet.
detachSelectionChanged(fnFunction, oListener)Detaches event handler fnFunction from the selectionChanged event of this sap.ui.ux3.DataSet.
fireSearch(mParameters?)Fires event search to attached listeners.
fireSelectionChanged(mParameters?)Fires event selectionChanged to attached listeners.
getFilter()Gets content of aggregation filter.
getItems()Gets content of aggregation items.
getLeadSelection(sItemId)Returns the LeadSelection index
getMultiSelect()Gets current value of property multiSelect.
getSelectedIndex()use this function to retrieve the lead selected index
getSelectedIndices()use this function to retrieve all selected indices if multiple select is enabled
getSelectedItemId(iIndex)Returns id of selected Item from given index
getSelectedView()ID of the element which is the current target of the association selectedView, or null.
getShowFilter()Gets current value of property showFilter.
getShowSearchField()Gets current value of property showSearchField.
getShowToolbar()Gets current value of property showToolbar.
getViews()Gets content of aggregation views.
indexOfFilter(oFilter)Checks for the provided sap.ui.core.Control in the aggregation filter.
indexOfItem(oItem)Checks for the provided sap.ui.ux3.DataSetItem in the aggregation items.
indexOfView(oView)Checks for the provided sap.ui.ux3.DataSetView in the aggregation views.
insertFilter(oFilter, iIndex)Inserts a filter into the aggregation filter.
insertItem(oItem, iIndex)Inserts a item into the aggregation items.
insertView(oView, iIndex)Inserts a view into the aggregation views.
isSelectedIndex(iIndex)Returns true if iIndex is selected
removeAllFilter()Removes all the controls from the aggregation filter.
removeAllItems()Removes all the controls from the aggregation items.
removeAllViews()Removes all the controls from the aggregation views.
removeFilter(vFilter)Removes a filter from the aggregation filter.
removeItem(vItem)Removes a item from the aggregation items.
removeToolbarItem(oOToolbarItem)remove a toolbarItem to the toolbar
removeView(vView)Removes a view from the aggregation views.
setLeadSelection(iIIndex)Set the LeadSelection index
setMultiSelect(bMode)setter for multi selection mode
setSelectedView(oSelectedView)Sets the associated selectedView.
setShowFilter(bShowFilter)Sets a new value for property showFilter.
setShowSearchField(bShowSearchField)Sets a new value for property showSearchField.
setShowToolbar(bShowToolbar)Sets a new value for property showToolbar.
unbindItems()Unbinds aggregation items from model data.
Constructor Detail
new sap.ui.ux3.DataSet(sId?, mSettings?)

Constructor for a new DataSet.

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

    • items : sap.ui.ux3.DataSetItem[]
    • views : sap.ui.ux3.DataSetView[]
    • filter : sap.ui.core.Control[]

  • Associations

  • Events

    • selectionChanged : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
    • search : 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:
stringsId?id for the new control, generated automatically if no id is given
objectmSettings?initial settings for the new control
Event Detail
search(oControlEvent)
Event which is fired when the user triggers a search
Parameters:
sap.ui.base.EventoControlEvent
sap.ui.base.EventProvideroControlEvent.getSource
objectoControlEvent.getParameters
stringoControlEvent.getParameters.queryThe search query
selectionChanged(oControlEvent)
selection Changed
Parameters:
sap.ui.base.EventoControlEvent
sap.ui.base.EventProvideroControlEvent.getSource
objectoControlEvent.getParameters
intoControlEvent.getParameters.oldLeadSelectedIndexOld lead selected index
intoControlEvent.getParameters.newLeadSelectedIndexNew lead selected index
Method Detail
sap.ui.ux3.DataSet.extend(sClassName, oClassInfo?, FNMetaImpl?): function

Creates a new subclass of class sap.ui.ux3.DataSet 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:
stringsClassNameName of the class being created
objectoClassInfo?Object literal with information about the class
functionFNMetaImpl?Constructor function for the metadata object; if not given, it defaults to sap.ui.core.ElementMetadata
Returns:
functionCreated class / constructor function
sap.ui.ux3.DataSet.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.ui.ux3.DataSet.
Returns:
sap.ui.base.MetadataMetadata object describing this class
_rerenderFilter()
Rerendering of the FilterArea
_rerenderToolbar()
Rerendering of the Toolbar
addFilter(oFilter): sap.ui.ux3.DataSet
Adds some filter to the aggregation filter.
Parameters:
sap.ui.core.ControloFilterthe filter to add; if empty, nothing is inserted
Returns:
sap.ui.ux3.DataSetReference to this in order to allow method chaining
addItem(oItem): sap.ui.ux3.DataSet
Adds some item to the aggregation items.
Parameters:
sap.ui.ux3.DataSetItemoItemthe item to add; if empty, nothing is inserted
Returns:
sap.ui.ux3.DataSetReference to this in order to allow method chaining
addToolbarItem(oOToolbarItem): void
add a toolbarItem to the toolbar
Parameters:
sap.ui.commons.ToolbarItemoOToolbarItemToolbarItem
addView(oView): sap.ui.ux3.DataSet
Adds some view to the aggregation views.
Parameters:
sap.ui.ux3.DataSetViewoViewthe view to add; if empty, nothing is inserted
Returns:
sap.ui.ux3.DataSetReference to this in order to allow method chaining
attachSearch(oData?, fnFunction, oListener?): sap.ui.ux3.DataSet

Attaches event handler fnFunction to the search event of this sap.ui.ux3.DataSet.

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.ux3.DataSet itself.

Event which is fired when the user triggers a search

Parameters:
objectoData?An application-specific payload object that will be passed to the event handler along with the event object when firing the event
functionfnFunctionThe function to be called when the event occurs
objectoListener?Context object to call the event handler with. Defaults to this sap.ui.ux3.DataSet itself
Returns:
sap.ui.ux3.DataSetReference to this in order to allow method chaining
attachSelectionChanged(oData?, fnFunction, oListener?): sap.ui.ux3.DataSet

Attaches event handler fnFunction to the selectionChanged event of this sap.ui.ux3.DataSet.

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.ux3.DataSet itself.

selection Changed

Parameters:
objectoData?An application-specific payload object that will be passed to the event handler along with the event object when firing the event
functionfnFunctionThe function to be called when the event occurs
objectoListener?Context object to call the event handler with. Defaults to this sap.ui.ux3.DataSet itself
Returns:
sap.ui.ux3.DataSetReference to this in order to allow method chaining
bindItems(oBindingInfo): sap.ui.ux3.DataSet

Binds aggregation items to model data.

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

Parameters:
objectoBindingInfoThe binding information
Returns:
sap.ui.ux3.DataSetReference to this in order to allow method chaining
clearSelection()
clears dataset from all previous selections
createViewSwitch(oView, iIndex): object
Creates a view switch button
Parameters:
objectoViewView
intiIndexIndex of view
Returns:
objectviewSwitch instance
destroyFilter(): sap.ui.ux3.DataSet
Destroys all the filter in the aggregation filter.
Returns:
sap.ui.ux3.DataSetReference to this in order to allow method chaining
destroyItems(): sap.ui.ux3.DataSet
Destroys all the items in the aggregation items.
Returns:
sap.ui.ux3.DataSetReference to this in order to allow method chaining
destroyViews(): sap.ui.ux3.DataSet
Destroys all the views in the aggregation views.
Returns:
sap.ui.ux3.DataSetReference to this in order to allow method chaining
detachSearch(fnFunction, oListener): sap.ui.ux3.DataSet

Detaches event handler fnFunction from the search event of this sap.ui.ux3.DataSet.

The passed function and listener object must match the ones used for event registration.

Parameters:
functionfnFunctionThe function to be called, when the event occurs
objectoListenerContext object on which the given function had to be called
Returns:
sap.ui.ux3.DataSetReference to this in order to allow method chaining
detachSelectionChanged(fnFunction, oListener): sap.ui.ux3.DataSet

Detaches event handler fnFunction from the selectionChanged event of this sap.ui.ux3.DataSet.

The passed function and listener object must match the ones used for event registration.

Parameters:
functionfnFunctionThe function to be called, when the event occurs
objectoListenerContext object on which the given function had to be called
Returns:
sap.ui.ux3.DataSetReference to this in order to allow method chaining
fireSearch(mParameters?): sap.ui.ux3.DataSet
Fires event search to attached listeners.
Parameters:
objectmParameters?Parameters to pass along with the event
stringmParameters.query?The search query
Returns:
sap.ui.ux3.DataSetReference to this in order to allow method chaining
fireSelectionChanged(mParameters?): sap.ui.ux3.DataSet
Fires event selectionChanged to attached listeners.
Parameters:
objectmParameters?Parameters to pass along with the event
intmParameters.oldLeadSelectedIndex?Old lead selected index
intmParameters.newLeadSelectedIndex?New lead selected index
Returns:
sap.ui.ux3.DataSetReference to this in order to allow method chaining
getFilter(): sap.ui.core.Control[]

Gets content of aggregation filter.

Filter control (e.g. a FacetFilter) for the DataSet

Returns:
sap.ui.core.Control[]
getItems(): sap.ui.ux3.DataSetItem[]

Gets content of aggregation items.

Aggregation of DataSetItems

Returns:
sap.ui.ux3.DataSetItem[]
getLeadSelection(sItemId): int
Returns the LeadSelection index
Parameters:
stringsItemIdId of the selected DataSetItem
Returns:
intselected index
getMultiSelect(): boolean

Gets current value of property multiSelect.

Selection mode of the DataSet

Default value is false.

Returns:
booleanValue of property multiSelect
getSelectedIndex()
use this function to retrieve the lead selected index
getSelectedIndices()
use this function to retrieve all selected indices if multiple select is enabled
getSelectedItemId(iIndex): string
Returns id of selected Item from given index
Parameters:
intiIndexindex of selection
Returns:
stringid of selected item
getSelectedView(): sap.ui.core.ID
ID of the element which is the current target of the association selectedView, or null.
Returns:
sap.ui.core.ID
getShowFilter(): boolean

Gets current value of property showFilter.

show filter

Default value is true.

Returns:
booleanValue of property showFilter
getShowSearchField(): boolean

Gets current value of property showSearchField.

Show/hide SearchField in Toolbar

Default value is true.

Returns:
booleanValue of property showSearchField
getShowToolbar(): boolean

Gets current value of property showToolbar.

show Toolbar

Default value is true.

Returns:
booleanValue of property showToolbar
getViews(): sap.ui.ux3.DataSetView[]

Gets content of aggregation views.

views

Returns:
sap.ui.ux3.DataSetView[]
indexOfFilter(oFilter): int
Checks for the provided sap.ui.core.Control in the aggregation filter. and returns its index if found or -1 otherwise.
Parameters:
sap.ui.core.ControloFilterThe filter whose index is looked for
Returns:
intThe index of the provided control in the aggregation if found, or -1 otherwise
indexOfItem(oItem): int
Checks for the provided sap.ui.ux3.DataSetItem in the aggregation items. and returns its index if found or -1 otherwise.
Parameters:
sap.ui.ux3.DataSetItemoItemThe item whose index is looked for
Returns:
intThe index of the provided control in the aggregation if found, or -1 otherwise
indexOfView(oView): int
Checks for the provided sap.ui.ux3.DataSetView in the aggregation views. and returns its index if found or -1 otherwise.
Parameters:
sap.ui.ux3.DataSetViewoViewThe view whose index is looked for
Returns:
intThe index of the provided control in the aggregation if found, or -1 otherwise
insertFilter(oFilter, iIndex): sap.ui.ux3.DataSet
Inserts a filter into the aggregation filter.
Parameters:
sap.ui.core.ControloFilterthe filter to insert; if empty, nothing is inserted
intiIndexthe 0-based index the filter should be inserted at; for a negative value of iIndex, the filter is inserted at position 0; for a value greater than the current size of the aggregation, the filter is inserted at the last position
Returns:
sap.ui.ux3.DataSetReference to this in order to allow method chaining
insertItem(oItem, iIndex): sap.ui.ux3.DataSet
Inserts a item into the aggregation items.
Parameters:
sap.ui.ux3.DataSetItemoItemthe item to insert; if empty, nothing is inserted
intiIndexthe 0-based index the item should be inserted at; for a negative value of iIndex, the item is inserted at position 0; for a value greater than the current size of the aggregation, the item is inserted at the last position
Returns:
sap.ui.ux3.DataSetReference to this in order to allow method chaining
insertView(oView, iIndex): sap.ui.ux3.DataSet
Inserts a view into the aggregation views.
Parameters:
sap.ui.ux3.DataSetViewoViewthe view to insert; if empty, nothing is inserted
intiIndexthe 0-based index the view should be inserted at; for a negative value of iIndex, the view is inserted at position 0; for a value greater than the current size of the aggregation, the view is inserted at the last position
Returns:
sap.ui.ux3.DataSetReference to this in order to allow method chaining
isSelectedIndex(iIndex): boolean
Returns true if iIndex is selected
Parameters:
intiIndexindex of selection
Returns:
booleanindex selected true/false
removeAllFilter(): sap.ui.core.Control[]

Removes all the controls from the aggregation filter.

Additionally, it unregisters them from the hosting UIArea.

Returns:
sap.ui.core.Control[]An array of the removed elements (might be empty)
removeAllItems(): sap.ui.ux3.DataSetItem[]

Removes all the controls from the aggregation items.

Additionally, it unregisters them from the hosting UIArea.

Returns:
sap.ui.ux3.DataSetItem[]An array of the removed elements (might be empty)
removeAllViews(): sap.ui.ux3.DataSetView[]

Removes all the controls from the aggregation views.

Additionally, it unregisters them from the hosting UIArea.

Returns:
sap.ui.ux3.DataSetView[]An array of the removed elements (might be empty)
removeFilter(vFilter): sap.ui.core.Control
Removes a filter from the aggregation filter.
Parameters:
int|string|sap.ui.core.ControlvFilterThe filter to remove or its index or id
Returns:
sap.ui.core.ControlThe removed filter or null
removeItem(vItem): sap.ui.ux3.DataSetItem
Removes a item from the aggregation items.
Parameters:
int|string|sap.ui.ux3.DataSetItemvItemThe item to remove or its index or id
Returns:
sap.ui.ux3.DataSetItemThe removed item or null
removeToolbarItem(oOToolbarItem): void
remove a toolbarItem to the toolbar
Parameters:
sap.ui.commons.ToolbarItemoOToolbarItem
removeView(vView): sap.ui.ux3.DataSetView
Removes a view from the aggregation views.
Parameters:
int|string|sap.ui.ux3.DataSetViewvViewThe view to remove or its index or id
Returns:
sap.ui.ux3.DataSetViewThe removed view or null
setLeadSelection(iIIndex): void
Set the LeadSelection index
Parameters:
intiIIndexset LeadSelection index
setMultiSelect(bMode)
setter for multi selection mode
Parameters:
booleanbModetrue for multi mode, false for single mode
setSelectedView(oSelectedView): sap.ui.ux3.DataSet
Sets the associated selectedView.
Parameters:
sap.ui.core.ID|sap.ui.ux3.DataSetViewoSelectedViewID of an element which becomes the new target of this selectedView association; alternatively, an element instance may be given
Returns:
sap.ui.ux3.DataSetReference to this in order to allow method chaining
setShowFilter(bShowFilter): sap.ui.ux3.DataSet

Sets a new value for property showFilter.

show filter

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

Default value is true.

Parameters:
booleanbShowFilterNew value for property showFilter
Returns:
sap.ui.ux3.DataSetReference to this in order to allow method chaining
setShowSearchField(bShowSearchField): sap.ui.ux3.DataSet

Sets a new value for property showSearchField.

Show/hide SearchField in Toolbar

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

Default value is true.

Parameters:
booleanbShowSearchFieldNew value for property showSearchField
Returns:
sap.ui.ux3.DataSetReference to this in order to allow method chaining
setShowToolbar(bShowToolbar): sap.ui.ux3.DataSet

Sets a new value for property showToolbar.

show Toolbar

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

Default value is true.

Parameters:
booleanbShowToolbarNew value for property showToolbar
Returns:
sap.ui.ux3.DataSetReference to this in order to allow method chaining
unbindItems(): sap.ui.ux3.DataSet
Unbinds aggregation items from model data.
Returns:
sap.ui.ux3.DataSetReference to this in order to allow method chaining