Customization

Developers can customize the Menu Component content through the Data Set Assembly File. Menu Components can contain nested menu items that will expand to display new menu items when hovering over or selecting them.

IMPORTANT: A maximum of 250 menu items are supported.

CAUTION: When attempting to open a dashboard with a Menu Component that contains more than 250 Menu Items, you will receive an error message: Unable to create XFMenuItemCollection. A maximum of 250 menu items are supported.

See Menu Component and Menu Items for a list of all options you can use and set up in the Workspace Assembly or Business Rule code.

The Data Set Assembly file returns a method call that contains the whole collection of Menu Items that builds your Menu Component. When building this out, you will notice that the code contains repetitive elements. When creating new menu items, it will auto-complete and display the default arguments including the Menu Item's unique name, header text, foreground color, background color, and so on.

Copy
XFMenuItem XFMenuItem(string uniqueName, string headerText, string foreground, string background, bool isBold, bool isltalic, bool isEnabled, bool isSeparator,
double width, double height, double paddingLeft, double paddingTop, double paddingRight, double paddingBottom, XFImageFileSourceType imageFileSourceType, string 
imageNameOrPath, double imageColumnWidth, string parameterValue, string toolTip, List<XFMenuItem> children)

Sample Customization

See Sample Customization for samples of fully customized Data Set Service Files of a custom Menu Component.

Connect Items to the Menu Component

After customizing and creating your Menu Component, you must update, link, and connect these items. The Workspace retrieves information through its Workspace Assembly Service property, which contains the path to the Assembly and Service Factory - Assembly File. For example, MenuAssembly.WsasFactory. The Service Factory File references the Data Set Assembly file which contains the data and content needed for the Data Adapter. The Data Adapter can then query this data and be connected to the Menu Component to generate the menu items' content on a Dashboard.

IMPORTANT: You can connect any of the following items in any order. You do not need to follow this order.

Update the Data Adapter

  1. In the Maintenance Unit, navigate to Data Adapter.

  2. Update the Data Source:

    1. Update Command Type to Method.

    2. Update Method Type to Business Rule.

    3. Click on the Method Query ellipsis button, and update the Method Query to reflect the Workspace Menu Component item as it is being returned in the Assembly file or Business Rule. You can also do this through other Command Types, Method Types, or Queries.

      Example: {WS}{MainMenu}{SelectedMenuItem=[|!SelectedMenuItem!|]}

  3. Click the Save button to save the changes.

Update the Bound Parameter

NOTE: (Optional) Follow these steps if you are using Bound Parameters as part of your implementation.

  1. In the Maintenance Unit, navigate to Parameters.

  2. Rename the Parameter to work with the path of the Data Adapter. Click the Rename Selected Item toolbar button.

    Example: Rename Test Parameter to SelectedMenuItem.

  3. Click the Save button to save the changes.

  4. Add the specified Bound Parameter "SelectedMenuItem" to the Menu Component's Bound Parameter property.

Link the Data Adapter

  1. In the Maintenance Unit, navigate to the Menu Component.

  2. Click the Data Adapters tab.

  3. Click the Add Dashboard Component toolbar button, and select the Data Adapter you created.

  4. Click the OK button and then the Save button to save the changes.

Link the Menu Component

  1. Navigate to a Dashboard Group containing a Dashboard, and select the dashboard to connect with the Menu Component.

  2. Click the Dashboard Components tab.

  3. Click the Add Dashboard Component toolbar button, and select the Menu Component you created.

  4. Click the OK button and then the Save button to save the changes.

Update the Workspace Assembly Service

  1. Navigate to Workspaces, and select the Workspace created.

  2. Under the Assemblies, go to the Workspace Assembly Service property.

  3. Enter the path to the Service Factory - Assembly File you created.

    Example: MenuAssembly.WsasFactory

  4. Click the Save button to save the changes.

Run the Dashboard

  1. Navigate to Dashboard Groups, and select the dashboard linked with the Menu Component.

  2. Click the View Dashboard toolbar button.

  3. If the Parameter dialog box appears, enter a valid argument and then click the OK button.

    NOTE: The Menu Component displays on the dashboard.