Context Menu
There are many ways that the context menu can be modified. This will be described in steps below.
If the contextMenu property is set to false in the TableDisplay then the entire context menu will
never be displayed for any rows in that table.
TableDisplay{
contextMenu: false;
}
By default the context menu will contain all of the rows' actions. If you do not wish an action to
show in the context menu, set the contextMenu property to false in that action's ActionDescriptor
property group. For example, an operation with the following property groups:
ActionDescriptor{
name: CDT10;
actType: row;
contextMenu: false;
label: 10% Increase;
dspOrder: 10;
}
ActionDescriptor{
name: CDT50;
actType: row;
label: 50% Increase;
dspOrder: 20;
}
would have a context menu like this:
Notice the 10% Increase action is not included in the context menu.
Showing Actions Only in the Context Menu
You can use the loc property of the ActionDescriptor property group to show actions only in the
context menu. If the loc property is not present or is left blank then WOW will show the action
both inline in the row as well as in the context menu. If the location "context menu" is the only
location specifically listed in the loc property, then WOW will show the action in the context menu,
and will not show the action in any other location. So an operation with these property groups:
ActionDescriptor{
name: CDT10;actType: row;
loc: context menu;
label: 10% Increase;
dspOrder: 10;
}
ActionDescriptor{
name: CDT50;
actType: row;
label: 50% Increase;
dspOrder: 20;
}
would result in the following context menu:
Notice that the 10% Increase button does not appear in the row actions, only on the context menu.
Normally WOW will include applicable built-in actions in the context menu such as View, Edit, and Delete.
These actions will only show if the row supports that action. (For example the context menu will not contain
a Delete action if the row cannot be deleted.) However you can also suppress these built-in actions using the ActionContextMenuDescriptor property group. The ActionContextMenuDescriptor property group is a property
group which applies only to actions in the context menu. All properties in the ActionDescriptor property group
are also present in the ActionContextMenuDescriptor property group, except for the loc property (since the
context menu is the only location to which that property group applies). Setting the dspTyp property to “none”
in the ActionContextMenuDescriptor property group will prevent the built-in action from being displayed in the
context menu.
In order to hide the "Edit" in context menu:
the following property group could be put into the operation properties:
ActionContextMenuDescriptor{
name: edit;
actType: row;
dspType: none;
}
Now the row's context menu will not contain the Edit action: