MicroStrategy ONE

Menu Configuration File XML Structure

A menu configuration file groups a list of shortcut list objects, each of which represents a menu or context menu, within a shortcut list set. The shortcut list objects - menus or context menus - group a list of shortcut objects that define the menu items available from the menu or context menu. There can be multiple menu configuration files, each of which defines the choices available for a specific menu or context menu.

Menu configuration settings are generally set in separate files, but they can also be made within pageConfig.xml. The recommended practice is to use separate configuration files to ensure that your customizations are correctly propagated in future upgrades. You use the same XML structure whether you make the settings in separate files or in pageConfig.xml.

A sample of the XML structure for one of the menu configuration files, reportToolbarsMenu.xml,  is shown below, followed by a description of the elements and attributes that make up the file.

XML structure for reportToolbarsMenu.xml (one of several menu and context menu configuration files)

<shortcut-list-set base-bean="rb" name="report-menu" version="1.0">

  <shortcut-list base-bean="rb" desc="File" desc-id="mstrWeb.489" name="report" use-default="false">

    <shortcut append-state="true" base-bean="rb" desc="New" desc-id="mstrWeb.1895" feature-id="new-report" href="#" iframe="false" name="report1">

      <event XMLmerge_id="1" event-id="com.microstrategy.web.app.beans.EnumServletEvents.WebEventOpenCreate"/>

    </shortcut>

    <shortcut append-state="true" base-bean="rb" desc="Save As" desc-id="mstrWeb.1896" enable-feature-id="enable-save-report" feature-id="not-datamart;save-report" href="#" iframe="false" name="report2">

      <event XMLmerge_id="1" event-id="com.microstrategy.web.app.beans.EnumServletEvents.WebEventSaveAs">

        <argument name="com.microstrategy.web.app.beans.EnumServletEvents.WebEventArgumentApplyChangesFirst" value="false"/>

        <argument base-bean="rb" name="com.microstrategy.web.app.beans.EnumServletEvents.WebEventArgumentReportParentFolderID" sys-bean="com.microstrategy.web.beans.ReportBean" value="parentID"/>

      </event>

    </shortcut>

    ...

  </shortcut-list>

</shortcut-list-set>

Description  

The table below describes the XML structure of the menus 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 <shortcut> 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

<shortcut-list-set>

1 or more

 

 

The <shortcut-list-set> element represents a set of menus and groups a list of shortcut list objects, each of which represents a menu or context menu in the set. The shortcut list objects - menus or context menus - in turn group a list of shortcut objects that define the menu items available from the menu or context menu. (When you use a separate menus configuration file, the <shortcut-list-set> element represents the root element of the file.)

config-src

(cdata / implied)

If the list of menus is defined in a separate file, the config-src attribute tells the page configuration file the location of the menus configuration file.

version

(nmtoken / implied)

If the list of menus is defined in a separate file, the version attribute indicates the release number of the menus 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 list of menus. If an individual menu in the list does not define a base bean attribute, this bean is used in tasks such as resolving features for the menu.

feature-id

(cdata / implied)

The feature-id attribute represents a feature that is evaluated to determine whether the menus in the list should be rendered.

name

(nmtoken / implied)

The name attribute provides a unique identifier for the list of menus.

javascript-file

(cdata / implied)

If the list of menus 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 list of menus is associated with a JavaScript bone, the script-class attribute defines the name of the JavaScript class that corresponds to the JavaScript bone.

<shortcut-list>

 

0 or more

 

 

The <shortcut-list> element represents a single menu or context menu and groups a list of shortcut objects, each of which defines a single menu item in the menu or context menu.

config-src

(cdata / implied)

If the menu is defined in a separate file, the config-src attribute tells the page configuration file the location of the menu definition file.

version

(nmtoken / implied)

 

If the menu is defined in a separate file, the version attribute indicates the release number of the menu 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 menu. If an individual menu item in the menu does not define a base bean attribute, this bean is used in tasks such as resolving features for the menu item. (If this attribute is not set, the application tries to use the base-bean attribute that was set for the entire list of menus in the parent <shortcut-list-set> element.)

desc

(cdata / implied)

The desc attribute provides a descriptor that the application should use to display the menu 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 menu 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 menu should be displayed.

enable-feature-id

(cdata / implied)

The enable-feature-id attribute represents a feature that is evaluated to determine whether the menu should appear enabled or disabled when it is displayed.

name

(nmtoken / implied)

The name attribute provides a unique identifier for the menu.

css-class

(cdata / implied)

The css-class attribute defines the css class to associate with the menu object’s container when it is rendered.

types

(styles / implied)

When its value is set to 'styles', the types attribute indicates that the menu to be rendered is associated with a list of metadata styles.

use-container

(false | true  / implied)

The use-container attribute indicates whether the menu is contained in an independent html container.

use-default

(false | true  / implied)

The use-default attribute indicates whether the menu definition should be inherited from a menu defined in the default page that shares the same name.

<shortcut>

0 or more

 

 

The <shortcut> element is used to define a single menu item in a menu or context menu.

append-state

(cdata / implied)

The append-state attribute indicates whether the menu item (shortcut) 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 menu item. This bean is used in tasks such as resolving features for the menu item. (If this attribute is not set, the application tries to use the base-bean attribute that was set for the entire menu in the parent <shortcut-list> element.)

base-bone

(cdata / implied)

 

The base-bone attribute defines the name of a JavaScript bone with which the menu item is associated. If present, this bone is used to find the DHTML methods defined in other attributes of the menu item (<shortcut> element).

desc

(cdata / implied)

The desc attribute provides a descriptor that the application should use to display the menu item 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 menu item 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 menu item 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 menu item.)

enable-feature-id

(cdata / implied)

The enable-feature-id attribute represents a feature that is evaluated to determine whether the menu item 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 menu item.)

check-feature-id

(cdata / implied)

The check-feature-id attribute represents a feature that is evaluated to determine whether the menu item 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 menu item.)

dhtml-show

(cdata / implied)

The dhtml-show attribute represents a DHTML code segment that is evaluated to determine whether the menu item should be displayed. (This evaluation takes place when the user interacts with the menu item 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 menu item should appear enabled or disabled when it is displayed. (This evaluation takes place when the user interacts with the menu item 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 menu item should appear checked or cleared when it is displayed. (This evaluation takes place when the user interacts with the menu item 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 menu item is clicked.

iframe

(false | true  / implied)

When the iframe attribute’s value is set to 'true', the menu item uses the application’s iframe infrastructure to submit the user’s request to the Web server.

img-height

(cdata / implied)

If the menu item is represented as an image, the img-height attribute indicates the height of the image.

img-src

(cdata / implied)

If the menu item is represented as an image, the img-src attribute indicates the source path of the image.

img-width

(cdata / implied)

If the menu item is represented as an image, the img-width attribute indicates the width of the image.

builder-class-name

(cdata / implied)

The builder-class-name attribute defines the fully-qualified name of the class to use when building context menu items using the shortcut definition.

key-shortcut-desc

(cdata / implied)

 

The key-shortcut-desc attribute provides a descriptor that the application should use to display the accelerator key (keyboard shortcut) if the key-shortcut-desc-id attribute is missing.

key-shortcut-desc-id

(cdata / implied)

The key-shortcut-desc-id attribute provides the Resource Bundle item id that the application should use to display the accelerator key (keyboard shortcut) in the language of the user's locale.

name

(nmtoken / required)

The name attribute provides a unique identifier for the menu item.

onclick

(cdata / implied)

The onclick attribute represents a DHTML code segment that is evaluated when the menu item is clicked.

selected

(false | true  / implied)

The selected attribute indicates whether the menu item should be rendered as the selected menu item on the menu.

bean-style

(cdata / implied)

The bean-style attribute indicates the style from the Style Catalog used to render the menu item’s base bean when the type attribute of the menu item is set to 'bean'.

target

(cdata / implied)

The target attribute indicates the target window to which the request is directed when the menu item is clicked.

use-window-open

(false | true / implied)

 

If the use-window-open attribute is set to 'true' and the target attribute is set, the application uses window.open to open the target window specified by the target attribute. (This is used specifically for exporting so that the new window has a reference to the parent window, so that it can send the updated status back to the parent.)

<event>

 

0 or 1

 

 

The <event> element defines either an event to be executed when the user clicks on the parent menu item or an update action to be performed on the menu item when the event is handled by the application. (Events that are executed when the user clicks on the parent shortcut link do not have child <argument> elements. Events that cause an update action to be performed on the shortcut - like those in menus - must have child <argument> elements.

action

(check | uncheck | refresh | enabled | disabled /  implied)

The action attribute defines whether the menu item is checked, cleared, refreshed entirely, enabled or disabled 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 that was set for the entire menu in the parent <shortcut> element.)

event-id

(cdata / required)

The event-id attribute indicates the application event id associated with the event.

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 menu item only when the state of the menu item (shortcut) matches the value of this attribute.

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.

<argument>

0 or more

 

 

The <argument> element defines an argument’s name-value pair that is added to the parent event when the menu item 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 argument. 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 that was set for the entire menu in the parent <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 represents the id of 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 bean’s method name.

value

(cdata / implied)

The value attribute represents the value that is assigned to the argument.

See also