Previous Topic: Define a Keyboard ShortcutNext Topic: Limit the Availability of Menu Items


Specify an Action to Perform

The <action> element specifies the action that the menu item performs. You can use the child elements shown in the following table to specify a particular action.

The <context> element specifies when the menu item is active so that the action can be run. This applies to both the standard and the shortcut menus. You can specify a ModelContext, which indicates that the action is available when you select a CI. You can also specify an AlarmContext, which indicates that the action is available when you select an alert.

<context>com.aprisma.spectrum.app.topo.client.render.ModelContext
</context>
<context>com.aprisma.spectrum.app.alarm.client.group.AlarmContext
</context>

You can specify one or both contexts. If no specified context matches the current window context, the menu item is disabled. If no contexts are specified, the menu item is displayed in all contexts.

The following table describes the elements used to implement an action.

Element

Parent Element

Description

<context>

<action>

Specifies when the menu item is active so that you can perform the action.

<filter>

<action>

Limits the display of menu items.

<has-attribute>

<filter>

Specifies the attribute on which to filter.

<and>, <or>, <value>, <equals>

<filter>

Creates an expression for use with a filter.

<launch-browser>

<action>

Opens a browser. See Launch a Browser for more information.

<launch-sso-browser>

<action>

Opens a browser and includes in the URL a single sign-on token associated with the current session. You can use this token to reauthenticate the session across integrated web applications instead of prompting repeatedly for a user name and password. See Launch a Browser for more information.

<url>

<launch-browser>

Specifies the URL to launch in the browser.

<launch-application>

<action>

Opens an application. See Launch an Application for more information.

<launch-web-server-script>

<action>

Launches a script available on the web server. See Launch a Web Server Script for more information.

<display-output>

<launch-application>, <launch-web-server-script>

Displays the output from the script you ran. For more information, see Display the Status of a Launched Application or Script.

<display-exit-status>

<launch-application>, <launch-web-server-script>

Displays the exit status of a launched script.

<command>

<launch-application>, <launch-web-server-script>, <platform>

Specifies the application or script that the menu item launches.

<platform>

<launch-application>

Used with <os-name> to specify the application to launch based on the client operating system.

<os-name>

<platform>

Used with <platform> to specify the application to launch for the client operating system.

<param>

<url>, <command>

Specifies a parameter that is passed to a browser, program, or script.

<attribute>

<param>

Specifies an attribute used as a parameter.