The TablePersoController can be used to connect a table with a persistence service.
Constructor for a new TablePersoController.
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.table.TablePersoController(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 |
---|---|---|---|
autoSave | boolean | true | Auto save state Visibility: public |
customDataKey | string | persoKey | By defining a custom data key the |
persoService | any | Personalization Service object. Needs to have the following methods:
|
|
resetAllMode | sap.ui.table.ResetAllMode | Default | Controls the behavior of the Reset button of the |
showResetAll | boolean | true | Controls the visibility of the Reset button of the |
Name | Cardinality | Type | Description |
---|---|---|---|
table | 0..1 | sap.ui.table.Table |
The target table of this controller. |
Method | Description |
---|---|
sap.ui.table.TablePersoController.extend |
Creates a new subclass of class sap.ui.table.TablePersoController with name
|
getAutoSave |
Gets current value of property autoSave. Auto save state Default value is |
getCustomDataKey |
Gets current value of property customDataKey. By defining a custom data key the Default value is |
sap.ui.table.TablePersoController.getMetadata |
Returns a metadata object for class sap.ui.table.TablePersoController. |
getPersoService |
Gets current value of property persoService. Personalization Service object. Needs to have the following methods:
|
getResetAllMode |
Gets current value of property resetAllMode. Controls the behavior of the Reset button of the Default value is |
getShowResetAll |
Gets current value of property showResetAll. Controls the visibility of the Reset button of the Default value is |
getTable |
ID of the element which is the current target of the association table, or |
openDialog |
Opens the personalization dialog for the Table to modify the visibility and the order of the columns. Using this functionality will require to load the sap.m library because the personalization dialog is only available in this library for now. |
refresh |
Refresh the personalizations (reloads data from service). |
savePersonalizations |
Saves the current personalization state. |
setAutoSave |
Sets a new value for property autoSave. Auto save state When called with a value of Default value is |
setCustomDataKey |
Sets a new value for property customDataKey. By defining a custom data key the When called with a value of Default value is |
setPersoService |
Sets a new value for property persoService. Personalization Service object. Needs to have the following methods:
When called with a value of |
setResetAllMode |
Sets a new value for property resetAllMode. Controls the behavior of the Reset button of the When called with a value of Default value is |
setShowResetAll |
Sets a new value for property showResetAll. Controls the visibility of the Reset button of the When called with a value of Default value is |
setTable |
Sets the associated table. |
Creates a new subclass of class sap.ui.table.TablePersoController 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.base.ManagedObject.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 |
Gets current value of property customDataKey.
By defining a custom data key the TablePersoController
will try to get the key for saving the perso data from the custom data of the Table and Column instead of creating it by concatenating the ID of the Table and the Column. Basically this will be more stable than using the auto IDs.
Default value is "persoKey"
.
Returns a metadata object for class sap.ui.table.TablePersoController.
Gets current value of property persoService.
Personalization Service object. Needs to have the following methods:
jQuery Promise
(http://api.jquery.com/promise/)jQuery Promise
(http://api.jquery.com/promise/)jQuery Promise
(http://api.jquery.com/promise/)Gets current value of property resetAllMode.
Controls the behavior of the Reset button of the TablePersoDialog
.
The value must be specified in the constructor and cannot be set or modified later.
If set to Default
, the Reset button sets the table back to the initial state of the attached table when the controller is activated.
If set to ServiceDefault
, the Reset button goes back to the initial settings of persoService
.
If set to ServiceReset
, the Reset button calls the getResetPersData
of the attached persoService
and uses it to reset the table.
Default value is Default
.
Gets current value of property showResetAll.
Controls the visibility of the Reset button of the TablePersoDialog
.
Default value is true
.
Opens the personalization dialog for the Table to modify the visibility and the order of the columns.
Using this functionality will require to load the sap.m library because the personalization dialog is only available in this library for now.
Param | Type | DefaultValue | Description |
---|---|---|---|
mSettings | object |
Sets a new value for property autoSave.
Auto save state
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 |
---|---|---|---|
bAutoSave | boolean | true |
New value for property |
Sets a new value for property customDataKey.
By defining a custom data key the TablePersoController
will try to get the key for saving the perso data from the custom data of the Table and Column instead of creating it by concatenating the ID of the Table and the Column. Basically this will be more stable than using the auto IDs.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is "persoKey"
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sCustomDataKey | string | "persoKey" |
New value for property |
Sets a new value for property persoService.
Personalization Service object. Needs to have the following methods:
jQuery Promise
(http://api.jquery.com/promise/)jQuery Promise
(http://api.jquery.com/promise/)jQuery Promise
(http://api.jquery.com/promise/)When called with a value of null
or undefined
, the default value of the property will be restored.
Param | Type | DefaultValue | Description |
---|---|---|---|
oPersoService | any |
New value for property |
Sets a new value for property resetAllMode.
Controls the behavior of the Reset button of the TablePersoDialog
.
The value must be specified in the constructor and cannot be set or modified later.
If set to Default
, the Reset button sets the table back to the initial state of the attached table when the controller is activated.
If set to ServiceDefault
, the Reset button goes back to the initial settings of persoService
.
If set to ServiceReset
, the Reset button calls the getResetPersData
of the attached persoService
and uses it to reset the table.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is Default
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sResetAllMode | sap.ui.table.ResetAllMode | Default |
New value for property |
Sets a new value for property showResetAll.
Controls the visibility of the Reset button of the TablePersoDialog
.
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 |
---|---|---|---|
bShowResetAll | boolean | true |
New value for property |
Sets the associated table.
Param | Type | DefaultValue | Description |
---|---|---|---|
oTable | sap.ui.core.ID sap.ui.table.Table |
ID of an element which becomes the new target of this table association; alternatively, an element instance may be given |