DataSet
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#constructor for a general description of the syntax of the settings object.
new sap.ui.ux3.DataSet(sId?, mSettings?)
Param | Type | Default Value | Description |
---|---|---|---|
sId? | string | id for the new control, generated automatically if no id is given |
|
mSettings? | object | initial settings for the new control |
Name | Type | Default Value | Description |
---|---|---|---|
multiSelect | boolean | false | Selection mode of the DataSet Visibility: public |
showFilter | boolean | true | show filter Visibility: public |
showSearchField | boolean | true | Show/hide SearchField in Toolbar Visibility: public |
showToolbar | boolean | true | show Toolbar Visibility: public |
Default Aggregation:
Name | Cardinality | Type | Description |
---|---|---|---|
_toolbar | 0..1 | sap.ui.commons.Toolbar |
A Toolbar, internally managed by Dataset |
_viewSwitches | 0..n | sap.ui.core.Control |
Internally managed by Dataset |
filter | 0..n | sap.ui.core.Control |
Filter control (e.g. a FacetFilter) for the DataSet |
items | 0..n | sap.ui.ux3.DataSetItem |
Aggregation of DataSetItems |
views | 0..n | sap.ui.ux3.DataSetView |
views |
Name | Cardinality | Type | Description |
---|---|---|---|
selectedView | 0..1 | sap.ui.ux3.DataSetView |
Selected view of the Dataset |
Event | Description |
---|---|
search |
Event which is fired when the user triggers a search |
selectionChanged |
selection Changed |
Method | Description |
---|---|
_rerenderFilter |
Rerendering of the FilterArea |
_rerenderToolbar |
Rerendering of the Toolbar |
addFilter |
Adds some filter to the aggregation filter. |
addItem |
Adds some item to the aggregation items. |
addToolbarItem |
add a toolbarItem to the toolbar |
addView |
Adds some view to the aggregation views. |
attachSearch |
Attaches event handler When called, the context of the event handler (its Event which is fired when the user triggers a search |
attachSelectionChanged |
Attaches event handler When called, the context of the event handler (its selection Changed |
bindItems |
Binds aggregation items to model data. See ManagedObject.bindAggregation for a detailed description of the possible properties of |
clearSelection |
clears dataset from all previous selections |
createViewSwitch |
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 |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachSelectionChanged |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
sap.ui.ux3.DataSet.extend |
Creates a new subclass of class sap.ui.ux3.DataSet with name
|
fireSearch |
Fires event search to attached listeners. |
fireSelectionChanged |
Fires event selectionChanged to attached listeners. |
getFilter |
Gets content of aggregation filter. Filter control (e.g. a FacetFilter) for the DataSet |
getItems |
Gets content of aggregation items. Aggregation of DataSetItems |
getLeadSelection |
Returns the LeadSelection index |
sap.ui.ux3.DataSet.getMetadata |
Returns a metadata object for class sap.ui.ux3.DataSet. |
getMultiSelect |
Gets current value of property multiSelect. Selection mode of the DataSet Default value is |
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 |
Returns id of selected Item from given index |
getSelectedView |
ID of the element which is the current target of the association selectedView, or |
getShowFilter |
Gets current value of property showFilter. show filter Default value is |
getShowSearchField |
Gets current value of property showSearchField. Show/hide SearchField in Toolbar Default value is |
getShowToolbar |
Gets current value of property showToolbar. show Toolbar Default value is |
getViews |
Gets content of aggregation views. views |
indexOfFilter |
Checks for the provided |
indexOfItem |
Checks for the provided |
indexOfView |
Checks for the provided |
insertFilter |
Inserts a filter into the aggregation filter. |
insertItem |
Inserts a item into the aggregation items. |
insertView |
Inserts a view into the aggregation views. |
isSelectedIndex |
Returns true if iIndex is selected |
removeAllFilter |
Removes all the controls from the aggregation filter. Additionally, it unregisters them from the hosting UIArea. |
removeAllItems |
Removes all the controls from the aggregation items. Additionally, it unregisters them from the hosting UIArea. |
removeAllViews |
Removes all the controls from the aggregation views. Additionally, it unregisters them from the hosting UIArea. |
removeFilter |
Removes a filter from the aggregation filter. |
removeItem |
Removes a item from the aggregation items. |
removeToolbarItem |
remove a toolbarItem to the toolbar |
removeView |
Removes a view from the aggregation views. |
setLeadSelection |
Set the LeadSelection index |
setMultiSelect |
setter for multi selection mode |
setSelectedView |
Sets the associated selectedView. |
setShowFilter |
Sets a new value for property showFilter. show filter When called with a value of Default value is |
setShowSearchField |
Sets a new value for property showSearchField. Show/hide SearchField in Toolbar When called with a value of Default value is |
setShowToolbar |
Sets a new value for property showToolbar. show Toolbar When called with a value of Default value is |
unbindItems |
Unbinds aggregation items from model data. |
Adds some filter to the aggregation filter.
Param | Type | DefaultValue | Description |
---|---|---|---|
oFilter | sap.ui.core.Control |
The filter to add; if empty, nothing is inserted |
Adds some item to the aggregation items.
Param | Type | DefaultValue | Description |
---|---|---|---|
oItem | sap.ui.ux3.DataSetItem |
The item to add; if empty, nothing is inserted |
add a toolbarItem to the toolbar
Param | Type | DefaultValue | Description |
---|---|---|---|
oOToolbarItem | sap.ui.commons.ToolbarItem |
ToolbarItem |
Adds some view to the aggregation views.
Param | Type | DefaultValue | Description |
---|---|---|---|
oView | sap.ui.ux3.DataSetView |
The view to add; if empty, nothing is inserted |
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
Param | Type | DefaultValue | Description |
---|---|---|---|
oData | object |
An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called when the event occurs |
|
oListener | object |
Context object to call the event handler with. Defaults to this |
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
Param | Type | DefaultValue | Description |
---|---|---|---|
oData | object |
An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called when the event occurs |
|
oListener | object |
Context object to call the event handler with. Defaults to this |
Binds aggregation items to model data.
See ManagedObject.bindAggregation for a detailed description of the possible properties of oBindingInfo
.
Param | Type | DefaultValue | Description |
---|---|---|---|
oBindingInfo | sap.ui.base.ManagedObject.AggregationBindingInfo |
The binding information |
Creates a view switch button
Param | Type | DefaultValue | Description |
---|---|---|---|
oView | object |
View |
|
iIndex | int |
Index of view |
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.
Param | Type | DefaultValue | Description |
---|---|---|---|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called, when the event occurs |
|
oListener | object |
Context object on which the given function had to be called |
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.
Param | Type | DefaultValue | Description |
---|---|---|---|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called, when the event occurs |
|
oListener | object |
Context object on which the given function had to be called |
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.
Param | Type | DefaultValue | Description |
---|---|---|---|
sClassName | string |
Name of the class being created |
|
oClassInfo | object |
Object literal with information about the class |
|
FNMetaImpl | function |
Constructor function for the metadata object; if not given, it defaults to the metadata implementation used by this class |
Fires event search to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
|
query | string |
The search query |
Fires event selectionChanged to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
|
oldLeadSelectedIndex | int |
Old lead selected index |
|
newLeadSelectedIndex | int |
New lead selected index |
Gets current value of property multiSelect.
Selection mode of the DataSet
Default value is false
.
Returns id of selected Item from given index
Param | Type | DefaultValue | Description |
---|---|---|---|
iIndex | int |
index of selection |
ID of the element which is the current target of the association selectedView, or null
.
Gets current value of property showSearchField.
Show/hide SearchField in Toolbar
Default value is true
.
Checks for the provided sap.ui.core.Control
in the aggregation filter. and returns its index if found or -1 otherwise.
Param | Type | DefaultValue | Description |
---|---|---|---|
oFilter | sap.ui.core.Control |
The filter whose index is looked for |
Checks for the provided sap.ui.ux3.DataSetItem
in the aggregation items. and returns its index if found or -1 otherwise.
Param | Type | DefaultValue | Description |
---|---|---|---|
oItem | sap.ui.ux3.DataSetItem |
The item whose index is looked for |
Checks for the provided sap.ui.ux3.DataSetView
in the aggregation views. and returns its index if found or -1 otherwise.
Param | Type | DefaultValue | Description |
---|---|---|---|
oView | sap.ui.ux3.DataSetView |
The view whose index is looked for |
Inserts a filter into the aggregation filter.
Param | Type | DefaultValue | Description |
---|---|---|---|
oFilter | sap.ui.core.Control |
The filter to insert; if empty, nothing is inserted |
|
iIndex | int |
The |
Inserts a item into the aggregation items.
Param | Type | DefaultValue | Description |
---|---|---|---|
oItem | sap.ui.ux3.DataSetItem |
The item to insert; if empty, nothing is inserted |
|
iIndex | int |
The |
Inserts a view into the aggregation views.
Param | Type | DefaultValue | Description |
---|---|---|---|
oView | sap.ui.ux3.DataSetView |
The view to insert; if empty, nothing is inserted |
|
iIndex | int |
The |
Returns true if iIndex is selected
Param | Type | DefaultValue | Description |
---|---|---|---|
iIndex | int |
index of selection |
Removes all the controls from the aggregation filter.
Additionally, it unregisters them from the hosting UIArea.
Removes all the controls from the aggregation items.
Additionally, it unregisters them from the hosting UIArea.
Removes all the controls from the aggregation views.
Additionally, it unregisters them from the hosting UIArea.
Removes a filter from the aggregation filter.
Param | Type | DefaultValue | Description |
---|---|---|---|
vFilter | int string sap.ui.core.Control |
The filter to remove or its index or id |
Removes a item from the aggregation items.
Param | Type | DefaultValue | Description |
---|---|---|---|
vItem | int string sap.ui.ux3.DataSetItem |
The item to remove or its index or id |
remove a toolbarItem to the toolbar
Param | Type | DefaultValue | Description |
---|---|---|---|
oOToolbarItem | sap.ui.commons.ToolbarItem |
Removes a view from the aggregation views.
Param | Type | DefaultValue | Description |
---|---|---|---|
vView | int string sap.ui.ux3.DataSetView |
The view to remove or its index or id |
Set the LeadSelection index
Param | Type | DefaultValue | Description |
---|---|---|---|
iIIndex | int |
set LeadSelection index |
setter for multi selection mode
Param | Type | DefaultValue | Description |
---|---|---|---|
bMode | boolean |
true for multi mode, false for single mode |
Sets the associated selectedView.
Param | Type | DefaultValue | Description |
---|---|---|---|
oSelectedView | sap.ui.core.ID sap.ui.ux3.DataSetView |
ID of an element which becomes the new target of this selectedView association; alternatively, an element instance may be given |
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
.
Param | Type | DefaultValue | Description |
---|---|---|---|
bShowFilter | boolean | true |
New value for property |
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
.
Param | Type | DefaultValue | Description |
---|---|---|---|
bShowSearchField | boolean | true |
New value for property |
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
.
Param | Type | DefaultValue | Description |
---|---|---|---|
bShowToolbar | boolean | true |
New value for property |