MicroStrategy ONE
Toolbar Configuration File XML Structure
A toolbar configuration file groups a list of shortcut list objects (each representing a toolbar), within a shortcut list set (that represents the set of toolbars). Each shortcut list object, or toolbar, in turn groups a list of shortcut objects, which represent the links available form the toolbar. There can be multiple toolbar configuration files, each of which defines the choices available for a specific toolbar.
Toolbar configuration settings are generally set in a separate file, but they can also be made within pageConfig.xml. The recommended practice is to use a separate configuration file to ensure that your customizations are correctly propagated in future upgrades. You use the same XML structure whether you make the settings in a separate file or in pageConfig.xml.
A sample of the XML structure for one of the toolbar configuration files, reportPanelsToolbar.xml, is shown below, followed by a description of the elements and attributes that make up the file.
XML structure for reportPanelsToolbar.xml (one example of several toolbar configuration files)
<shortcut-list-set javascript-file="reportPanels.js" name="reportPanelsToolbar" script-class="mstrReportPanelsToolbarImpl" version="1.0">
<attribute name="at" value="UniqueReportID"/>
...
</attributes>
<shortcut-list name="panels">
<attribute name="ty" value="btng"/>
<attribute name="nowrap" value="1"/>
</attributes>
...
<shortcut base-bean="ob" check-feature-id="open" desc="Object Browser" desc-id="mstrWeb.1908" enable-feature-id="enable-object-browser" feature-id="dhtml;not-datamart;object-browser-editor" iframe="true" name="tbObjectBrowser" type="button">
<attributename="cmdtp" value="2"/>
<attribute name="cmdid" value="objBrowser"/>
</attributes>
</shortcut>
<shortcut base-bean="ob" check-feature-id="open" desc="Object Browser" desc-id="mstrWeb.1908" enable-feature-id="enable-object-browser" feature-id="!dhtml;not-datamart;object-browser-editor" iframe="true" name="tbObjectBrowserHTML" type="button">
<event XMLmerge_id="1" event-id="com.microstrategy.web.app.beans.EnumPageEvents.WebEventShowBean" state="checked">
<argument name="com.microstrategy.web.app.beans.EnumPageEvents.WebEventArgumentBean" value="ob"/>
<argument name="com.microstrategy.web.app.beans.EnumPageEvents.WebEventArgumentShowBean" value="false"/>
</event>
...
</shortcut>
</shortcut-list>
</shortcut-list-set>
Description
The table below describes the XML structure of a toolbar configuration file. The four columns in the table include the following descriptive information:
Parent Element - Child Element 1 - Child Element 2 |
Indicates the name of the element described in the next three columns. If this is a parent element, the names of all possible child elements are listed below the parent element. |
Number of Nodes |
Specifies the number of nodes that are required or allowed for the corresponding element in the Parent Element column. For example, if the value is "1", there must be only one node— no more, no less. If the value is "0 or more", the node is not required ("0"), but there is no restriction on the number of nodes that can be added ("or more"). If the value is "1 or more", the node is required ("1"), but there is no restriction on the number of nodes that can be added ("or more"). |
Parent Element Attributes |
Lists the separate attributes that can be used with the corresponding element in the Parent Element column. Included in parentheses beneath each attribute name are the attribute type and an indication of whether the attribute is required or implied. For example, the version attribute for the <shortcut-list-set> element has an attribute type of "nmtoken" (name token) and is implied. The name attribute for the <attribute> element has an attribute type of "cdata" (character data) and is required. |
Description |
Describes either a parent element in the Parent Element column or an attribute in the Parent Element Attributescolumn. |
Parent Element - Child Element 1 - Child Element 2 |
Number of Nodes | Parent Element Attributes | Description |
---|---|---|---|
|
1 or more
|
|
The <shortcut-list-set> element groups a set of toolbar objects. These <shortcut-list> elements define the toolbars used by the application. (When you use a separate toolbars configuration file, the <shortcut-list-set> element represents the root element of the file.) |
config-src (cdata / implied) |
If the set of toolbars is defined in a separate file, the config-src attribute tells the page configuration file the location of the toolbar set configuration file. |
||
version (nmtoken / implied) |
If the set of toolbars is defined in a separate file, the version attribute indicates the release number of the toolbar set configuration file. This attribute is useful for backwards compatibility because it lets the application know what features are available. |
||
base-bean (cdata / implied)
|
The base-bean attribute indicates the bean from the page’s bean hierarchy associated with the set of toolbars. If the toolbars in the set do not define a base bean attribute, this bean is used in tasks such as resolving features. |
||
feature-id (cdata / implied) |
The feature-id attribute represents a feature that is evaluated to determine whether the set of toolbars should be rendered. |
||
name (nmtoken / implied) |
The name attribute provides a unique identifier for the set of toolbars. |
||
javascript-file (cdata / implied) |
If the set of toolbars is associated with a JavaScript bone, the javascript-file attribute defines the JavaScript file that contains the JavaScript class corresponding to the JavaScript bone. |
||
script-class (cdata / implied) |
If the set of toolbars is associated with a JavaScript bone, the script-class attribute defines the name of the JavaScript class that corresponds to the JavaScript bone. |
||
0 or 1
|
|
The <attributes> element groups a list of attribute objects. These <attribute> elements define name-value pairs of html attributes that is added to the toolbar object’s container when rendered. |
|
config-src (cdata / implied) |
If the attributes are defined in a separate file, the config-src attribute tells the page configuration file the location of the attribute definition file. |
||
version (nmtoken / implied) |
If the attributes are defined in a separate file, the version attribute indicates the release number of the attribute definition file. This attribute is useful for backwards compatibility because it lets the application know what features are available. |
||
|
1 or more
|
|
The <attribute> element defines an html attribute name-value pair that is added to the toolbar object’s container when rendered. |
name (cdata / required) |
The name attribute defines the name of the html attribute to be added to the toolbar object’s container. |
||
value (cdata / required) |
The value attribute defines the value of the html attribute to be added to the toolbar object’s container. |
||
|
0 or more
|
|
The <shortcut-list> element groups a list of toolbar objects, which can be used to define toolbars. |
config-src (cdata / implied) |
If the toolbar lists are defined in a separate file, the config-src attribute tells the page configuration file the location of the toolbar list definition file. |
||
version (nmtoken / implied)
|
If the toolbar lists are defined in a separate file, the version attribute indicates the release number of the toolbar list definition file. This attribute is useful for backwards compatibility because it lets the application know what features are available. |
||
base-bean (cdata / implied)
|
The base-bean attribute indicates the bean from the page’s bean hierarchy associated with the toolbar list. If the toolbars inside the toolbar list do not define a base bean attribute, this bean is used in tasks such as resolving features. (If this attribute is not set, the application tries to use the base-bean attribute for the <shortcut-list-set> element.) |
||
desc (cdata / implied)
|
The desc attribute provides a descriptor that the application should use to display the toolbar list if the desc-id attribute is missing. |
||
desc-id (cdata / implied) |
The desc-id attribute provides the Resource Bundle item id that the application should use to display the toolbar list in the language of the user's locale. |
||
feature-id (cdata / implied) |
The feature-id attribute represents a feature that is evaluated to determine whether the toolbar list should be displayed. |
||
enable-feature-id (cdata / implied)
|
The enable-feature-id attribute represents a feature that is evaluated to determine whether the toolbar list should appear enabled or disabled when it is displayed. |
||
name (nmtoken / implied) |
The name attribute provides a unique identifier for the toolbar list. |
||
css-class (cdata / implied) |
The css-class attribute defines the css class to associate with the object’s container when it is rendered. |
||
types (styles / implied) |
When its value is set to 'styles', the types attribute indicates that the list to be rendered is associated with a list of metadata styles. |
||
use-container (false | true / implied) |
The use-container attribute indicates whether the toolbar list is contained in an independent html container. |
||
use-default (false | true / implied)
|
The use-default attribute indicates whether the toolbar list definition should be inherited from a toolbar list defined in the default page that shares the same name. |
||
- <event> |
0 or more |
|
The <shortcut> element is used to define individual toolbar links. |
append-state (cdata / implied) |
The append-state attribute indicates whether the toolbar link includes the page’s state when rendered. |
||
base-bean (cdata / implied)
|
The base-bean attribute indicates the bean from the page’s bean hierarchy associated with the toolbar link This bean is used in tasks such as resolving features. (If this attribute is not set, the application tries to use the base-bean attribute for the <shortcut-list> element.) |
||
base-bone (cdata / implied)
|
The base-bone attribute defines the name of a JavaScript bone with which the toolbar link is associated. If present, this bone is used to find the DHTML methods defined in other attributes of the toolbar link . |
||
desc (cdata / implied) |
The desc attribute provides a descriptor that should be used by the application to display the toolbar link if the desc-id attribute is missing. |
||
desc-id (cdata / implied)
|
The desc-id attribute provides the Resource Bundle item id that should be used by the application to display the toolbar link in the language of the user's locale. |
||
feature-id (cdata / implied) |
The feature-id attribute represents a feature that is evaluated to determine whether the toolbar link should be displayed. (This evaluation takes place when the HTML is created and can be overridden by the DHTML evaluation - specified by the dhtml-show attribute - that takes place when the user interacts with the toolbar link.) |
||
enable-feature-id (cdata / implied) |
The enable-feature-id attribute represents a feature that is evaluated to determine whether the toolbar link should appear enabled or disabled when it is displayed. (This evaluation takes place when the HTML is created and can be overridden by the DHTML evaluation - specified by the dhtml-enabled attribute - that takes place when the user interacts with the toolbar link.) |
||
check-feature-id (cdata / implied) |
The check-feature-id attribute represents a feature that is evaluated to determine whether the toolbar link should appear checked or cleared when rendered. (This evaluation takes place when the HTML is created and can be overridden by the DHTML evaluation - specified by the dhtml-checked attribute - that takes place when the user interacts with the toolbar link.) |
||
dhtml-show (cdata / implied) |
The dhtml-show attribute represents a DHTML code segment that is evaluated to determine whether the toolbar link should be displayed. (This evaluation takes place when the user interacts with the toolbar link and overrides the results of the evaluation that takes place when the HTML is created - specified by the feature-id attribute.) |
||
dhtml-enabled (cdata / implied) |
The dhtml-enabled attribute represents a DHTML code segment that is evaluated to determine whether the toolbar link should appear enabled or disabled when it is displayed. (This evaluation takes place when the user interacts with the toolbar link and overrides the results of the evaluation that takes place when the HTML is created - specified by the enable-feature-id attribute.) |
||
dhtml-checked (cdata / implied)
|
The dhtml-checked attribute represents a DHTML code segment that is evaluated to determine whether the toolbar link should appear checked or cleared when it is displayed. (This evaluation takes place when the user interacts with the toolbar link and overrides the results of the evaluation that takes place when the HTML is created - specified by the check-feature-id attribute.) |
||
extra-url (cdata / implied) |
The extra-url attribute defines a URL segment that is appended to the link’s URL. |
||
href (cdata / implied) |
The href attribute indicates the HTTP resource to which the application is redirected when the toolbar link is clicked. |
||
iframe (false | true / implied)
|
When the iframe attribute’s value is set to 'true', the toolbar link uses the application’s iframe infrastructure to submit the user’s request to the Web server. |
||
img-height (cdata / implied) |
If the shortcut is represented as an image, the img-height attribute indicates the height of the image. |
||
img-src (cdata / implied) |
If the shortcut is represented as an image, the img-src attribute indicates the source path of the image. |
||
img-width (cdata / implied) |
If the shortcut is represented as an image, the img-width attribute indicates the width of the image. |
||
name (nmtoken / required) |
The name attribute provides a unique identifier for the toolbar link. |
||
onclick (cdata / implied) |
The onclick attribute represents a DHTML code segment that is evaluated when the toolbar link is clicked. |
||
selected (false | true / implied) |
The selected attribute indicates that the toolbar link is rendered as the selected link among the other links in the group. |
||
shortcut-class-name (cdata / implied) |
The shortcut-class-name attribute defines the fully-qualified name of the class to use when building toolbar items using the shortcut definition. |
||
bean-style (cdata / implied) |
The bean-style attribute indicates the style from the Style Catalog used to render the shortcut’s base bean when the type attribute of the toolbar link is set to 'bean'. |
||
type (colorpicker | button | bean / implied)
|
The type attribute defines the type of shortcut when used inside a toolbar. There are three possible values. When the value is set to 'colorpicker', the shortcut is a drop-down arrow on the toolbar that opens a grid with color choices in rows and columns. When the value is set to 'button', the shortcut is a button on the toolbar. When the value is set to 'bean', the shortcut on the toolbar represents the base bean in the style defined by the bean-style attribute. |
||
target (cdata / implied) |
The target attribute indicates the target window to which the request is directed when the toolbar link is clicked. |
||
use-window-open (false | true / implied)
|
If the use-window-open attribute is set to 'true' and the target attribute is set to a value, the application uses window.open to open the target window specified by the target attribute. |
||
0 or 1
|
|
The <event> element defines either an event to be executed when the user clicks on the parent toolbar link or an update action to be performed on the toolbar when the event is handled by the application. |
|
base-bean (cdata / implied) |
The base-bean attribute indicates the bean from the page’s bean hierarchy associated with the event. This bean is used in tasks such as resolving features. (If this attribute is not set, the application tries to use the base-bean attribute for the <shortcut> element.) |
||
event-id (cdata / required) |
The event-id attribute indicates the application event id associated with the element. |
||
feature-id (cdata / implied) |
The feature-id attribute represents a feature that is evaluated to determine whether the event is associated with the shortcut. If the feature is disabled, the event is not associated with the shortcut and the next event on the list is tried. The application uses the first event whose feature is enabled. |
||
state (checked | unchecked | hidden / implied) |
The state attribute indicates that the event is used by the shortcut only when the shortcut’s state matches this attribute’s value. |
||
state-level (cdata / implied)
|
The state-level attribute defines the state level (minimum, typical or maximum) that is added to the shortcut when the event is invoked. The expected value is a string that represents a fully-qualified class name - com.microstrategy.webapi.EnumWebPersistableState., followed by MINIMAL_STATE_INFO, TYPICAL_STATE_INFO, or MAXIMAL_STATE_INFO. |
||
XMLmerge_id (nmtoken / required) |
The XMLmerge_id attribute is a unique identifier used by the upgrade utility rather than the application. |
||
0 or more
|
|
The <argument> element defines the name-value pair for that parameter is passed to the parent event when the toolbar link is clicked by the user. |
|
base-bean (cdata / implied)
|
The base-bean attribute indicates the bean from the page’s bean hierarchy associated with the object. This bean is used in tasks such as resolving features. (If this attribute is not set, the application tries to use the base-bean attribute for the <event> element.) |
||
enum-name (cdata / implied) |
If the value of the argument is taken from an enumeration’s value, the enum-name attribute represents the fully-qualified name of such a value. |
||
id (nmtoken / implied) |
The id attribute is a unique identifier for the argument.
|
||
name (cdata / implied) |
The name attribute represents the fully-qualified name of the argument from the event’s enumeration interface. |
||
source (cdata / implied) |
The source attribute represents the source from which the argument’s value is taken (for example, 'enum'). |
||
sys-bean (cdata / implied) |
The sys-bean attribute represents the fully-qualified name of the bean’s class to which the base bean is cast when the value of the argument comes from a method name of the base bean. |
||
value (cdata / implied) |
The value attribute represents the value that is assigned to the argument. (If the value of this attribute is a method name of the base bean, you must set a value for the sys-bean attribute.) |
See also