Adding tabs and buttons
You can use methods from the Dojo class ExtensionMixin to add tabs or
buttons in a branch, release, or activity. You can also add buttons in a view, for example for
rules, decision tables, decision operations, or deployment configurations.
Adding a tab
Reference
ExtensionMixin.addTab: function(
/* String*/ id, /* Object */ props, /* Function */ callback, /* String */ pos)
Parameters
- id
- The ID of the tab.
- props
- The properties for the tab, as defined for a
dijit/layout/ContentPaneobject. - callback
- The function that is invoked when the tab is selected.
- pos
- The position of the tab, which can be either first, last, or a number. The default parameter is last.
Example
To add a new tab in a branch, you must override the following method./* override */ inBranchView: function(data) {
this.addTab('MyTab', { title: 'My Tab' }, callback);
}Adding a button
Reference
ExtensionMixin.addToolbarButton: function(
/* String*/ id, /* String */ label, /* Function */ callback, /* String */ pos)
Parameters
- id
- The ID of the button.
- label
- The label to use for the button.
- callback
- The function that is invoked when the button is selected.
- pos
- The position of the button, which can be either first, last, or a number. The default parameter is first.
Examples
To add a button in the toolbar in a branch, you must override the following method./* override */ inBranchView: function(data) {
this.addToolbarButton('MyButton', 'My Button', callback);
}
To add a button in the toolbar in a rule, or a decision table, you must override the
following
method.
/* override */ inBusinessArtifactView: function(data) {
this.addToolbarButton('MyEditorButton', 'My Button', callback)
}