ViewSettingsItem is used for modelling filter behaviour in the ViewSettingsDialog. It is derived from a core Item, but does not support the base class properties "textDirection" and "enabled", setting these properties will not have any effects. Apps should use the core Item's property key/
and provide a unique value for it. Not providing a key may lead to unexpected behavior of the sap.m.ViewSettingsDialog.
Constructor for a new ViewSettingsItem.
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.m.ViewSettingsItem(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 |
Event | Description |
---|---|
itemPropertyChanged |
Let the outside world know that some of its properties has changed. |
Let the outside world know that some of its properties has changed.
Param | Type | Description |
---|---|---|
oControlEvent | sap.ui.base.Event | |
getSource | sap.ui.base.EventProvider | |
getParameters | object | |
changedItem | sap.m.ViewSettingsItem |
Instance of the item that changed. |
propertyKey | string |
Key of the changed property. |
propertyValue | any |
Value of the changed property. |
Method | Description |
---|---|
attachItemPropertyChanged |
Attaches event handler When called, the context of the event handler (its Let the outside world know that some of its properties has changed. |
detachItemPropertyChanged |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
sap.m.ViewSettingsItem.extend |
Creates a new subclass of class sap.m.ViewSettingsItem with name
|
fireItemPropertyChanged |
Fires event itemPropertyChanged to attached listeners. |
sap.m.ViewSettingsItem.getMetadata |
Returns a metadata object for class sap.m.ViewSettingsItem. |
getSelected |
Gets current value of property selected. Selected state of the item. If set to "true", the item will be displayed as selected in the view settings dialog. Default value is |
setSelected |
Sets a new value for property selected. Selected state of the item. If set to "true", the item will be displayed as selected in the view settings dialog. When called with a value of Default value is |
Attaches event handler fnFunction
to the itemPropertyChanged event of this sap.m.ViewSettingsItem
.
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.m.ViewSettingsItem
itself.
Let the outside world know that some of its properties has 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 |
Detaches event handler fnFunction
from the itemPropertyChanged event of this sap.m.ViewSettingsItem
.
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.m.ViewSettingsItem 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.Item.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 itemPropertyChanged to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
|
changedItem | sap.m.ViewSettingsItem |
Instance of the item that changed. |
|
propertyKey | string |
Key of the changed property. |
|
propertyValue | any |
Value of the changed property. |
Gets current value of property selected.
Selected state of the item. If set to "true", the item will be displayed as selected in the view settings dialog.
Default value is false
.
Sets a new value for property selected.
Selected state of the item. If set to "true", the item will be displayed as selected in the view settings dialog.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is false
.
Param | Type | DefaultValue | Description |
---|---|---|---|
bSelected | boolean | false |
New value for property |