MicroStrategy ONE
Using Toolbars
The toolbars section in pageConfig.xml contains a series of toolbars— represented by individual <shortcut-list-set> elements— that are available to different pages. The config-src attribute of each <shortcut-list-set> element points to an external XML that contains the actual definition of the toolbar.
<toolbars>
...
<shortcut-list-set config-src="/WEB-INF/xml/config/reportCrosstabToolbar.xml" name="reportCrosstabToolbar" />
...
<shortcut-list-set config-src="/WEB-INF/xml/config/rwStandardToolbar.xml" name="rwStandardToolbar" />
...
<shortcut-list-set config-src="/WEB-INF/xml/config/documentStandardToolbar.xml" name="documentStandardToolbar" />
</toolbars>
Toolbar Structure
Each external XML toolbar definition file (that is, each file referenced by a config-src attribute in a <shortcut-list-set> child element of the <toolbars> node in pageConfig.xml) is made up the following XML elements:
-
<shortcut-list-set>: Root node for the toolbar. Delimits a toolbar from a different element in the HTML output.
-
<attributes>: This element serves as a root for a series of <attribute> elements.
-
<attribute>:The name and value of each <attribute> element is used to construct an attribute of a <div> tag in the HTML output generated for the toolbar.
-
-
For example, reportCrosstabToolbar.xml includes the following attributes:
<attributes>
<attribute name="at" value="UniqueReportID"/>
<attribute name="dg" value="3"/>
<attribute name="or" value="1"/>
<attribute name="ors" value="3"/>
<attribute name="nowrap" value="1"/>
</attributes>
The HTML output for the DIV tag generated for a "shortcut-list-set" with these attributes is shown below. Notice how individual <attribute> elements are mapped to specific attributes in the HTML output for this toolbar:
<div or="1" dg="3" nowrap="1" class="mstrToolbar" scriptclass="mstrToolbarImpl" name="reportCrosstabToolbar" at="UniqueReportID" id="reportCrosstabToolbar" ors="3">
-
<shortcut-list>: A toolbar can have multiple sections. A <shortcut-list> element delimits these sections. It contains a series of <shortcut> elements and can include <attribute> child elements just as a <shortcut-list-set> element does.
-
<shortcut>: A shortcut defines an option available in a toolbar. This element contains information for the icon shown on a page. It can include <attribute> child elements just as a <shortcut-list-set> element does, as well as <event> child elements. The <event> elements in turn can have <argument> child elements.
-
Click here to see a longer code sample from the reportStandardToolbar.xml file.
Graphics for Toolbar Icons
In order for the toolbar icons to display correctly, the graphics images used for the icons must comply with the requirements outlined below:
-
A graphic image used for a toolbar shortcut must be in GIF format.
-
The dimensions of a graphic image used for a simple toolbar shortcut (that is, a toolbar shortcut that cannot be enabled/disabled) must be 22x22 pixels.
-
The dimensions of a graphic image used for a toolbar shortcut that can be enabled/disabled must be 44x22 pixels.
-
The graphic image associated with a toolbar shortcut that can be enabled/disabled must be composed of two images (each 22x22 pixels) side-by-side. The image on the left is used to indicate that the feature is enabled, and the image on the right is used to indicate that the feature is disabled.
If the graphic images used for toolbar shortcuts are not the correct size, they will be resized in certain situations, but not in others. For example, if you specify the GIF file to use with the img-src attribute for a <shortcut> element in an XML toolbar configuration file, the image will be resized. However, if you specify the GIF file to use indirectly using the name attribute for a <shortcut> element in an XML toolbar configuration file, the image will not e resized.
Available Toolbar Definition Files
The following table lists the external toolbar definition files that have the structure discussed in this topic. They are grouped according to the page with which they are associated in MicroStrategy Web products. These XML files are located under WEB-INF\xml\config in the MicroStrategy application folder.
Page | Toolbars |
---|---|
My Subscriptions |
subscriptionsToolbar.xml |
Shared Reports
|
folderToolbar.xml
|
My Reports
|
folderToolbar.xml |
Report Execution |
reportCrosstabToolbar.xml |
|
reportFormatToolbar.xml |
|
reportGraphToolbar.xml |
|
reportGridToolbar.xml |
|
reportPanelsToolbar.xml |
|
reportStandardToolbar.xml |
Report Writing Documents |
rwControlsToolbar.xml |
|
rwCrosstabToolbar.xml |
|
rwFormatToolbar.xml |
|
rwGraphToolbar.xml |
|
rwGridToolbar.xml |
|
rwPanelsToolbar.xml |
|
rwStandardToolbar.xml |
HTML Document Execution |
documentStandardToolbar.xml |
The inboxToolbar.xml file, associated with the History List page, and the templateFilterToolbar.xmlfile, associated with the Shared Reports and My Reports pages, have a somewhat different structure.
See Also