Configuring Widget Handlers and Actions
Before you tackle this section, please ensure that you have a sound understanding of the settings mechanism.
Defining a Default Behavior
ActiveUI SDK provides default handlers and actions out of the box, each of which is controlled by a setting.
For example, the Default Pivot Table context menu is controlled by the pivot-table.handlers.contextmenu
setting.
For each handler and action, you can use the Settings mechanism to customize this default value.
For example, suppose you want to change the Default Pivot Table context menu, to have one that consists of two actions action1
and action2
, with respective plugin keys action1PluginKey
and action2PluginKey
.
To achieve this, override the associated setting in the Content Server.
"pivot-table.handlers.contextmenu": ["action1PluginKey", "action2PluginKey"]
The same idea applies for all handlers as well as actions and quick actions, and for all widgets.
Configuring Handlers and Actions for a Specific Bookmark
While it is very convenient to be able to customize the default handlers and actions once and for all, you might want to diverge from the default behavior for one specific bookmark. To achieve this, override the relevant setting at the root of the bookmark.
For example, here is how you would remove any action from a specific tabular view, by editing the corresponding bookmark:
{
+ "tabular-view.actions": [],
"body": {
"...": "..."
},
"style": {
"...": "..."
},
"...": "..."
}