5.12.8.7 Customizing Double-Click

 



 

A Foreword on Double-Click

 

A "double-click" function performed on an NMS panel or on a managed object triggers a defined action such as display of the "Properties" form or the "Details" form. Until now, this double-click function was hard coded thereby displaying only these "Properties" or "Details" form for panels such as Map, Network Database, Network Events, Alarms, Configured Collections, Batch Configuration and Policy. It is now possible to customize this double-click function by associating it with any menu-item of the NMS panel or the managed object (i.e. panel-specific or object-specific). This has been made possible by introducing a tag namely <DOUBLECLICK> </DOUBLECLICK>, which can be specified inside the menu configuration file.

 

Some important highlights on this <DOUBLECLICK> tag are :

Note: The double-click function associated with the Policy panel alone cannot be customized.

 

Categorizing <DOUBLECLICK> Functionality for Different Menu Types

 

The different menu types for which double-click functionality is applicable are Panel-Specific, Map-Specific, and Object-Specific menus

 

Panel-Specific Menu

 

As discussed earlier, the panel-specific menu configuration files can be located either in <Web NMS Home>/users/<username> directory or in <Web NMS Home>/html/defaultToAllUsers directory. The double-click function gets associated with an NMS panel when you double-click on the internal frame of the chosen panel. Whenever the client framework notifies a double-click operation performed on an NMS panel, it searches for the <DOUBLECLICK> tag in the panel-specific menu configuration file, and triggers the corresponding menu-action.

 

Some of the different ways in which a <DOUBLECLICK> tag can be specified in a menu configuration file are given below :

 

Specifying the Menu-Action

 

The menu-action that is to be triggered can be specified inside the <DOUBLECLICK></DOUBLECLICK> tag, such that the menu-action specified gets triggered on double-clicking in the panel.

 

<DOUBLECLICK

action_type="openframe"

action_value="com.adventnet.nms.pollui.PollUIFrame">

</DOUBLECLICK>

 

Specifying No Menu Action

 

If you want the double-click function to execute no action, then you can customize the same by specifying an empty <DOUBLECLICK></DOUBLECLICK> tag in the menu configuration file. This is as shown in the snippets below :

 

<DOUBLECLICK>

</DOUBLECLICK>

 

Specifying the Menu-Item

 

You can customize the double-click functionality by specifying the menu-item inside the <DOUBLECLICK> </DOUBLECLICK>tag, whose corresponding menu-action you desire to invoke on performing the double-click action. This is as shown in the snippets below :

 

<DOUBLECLICK

name="AddStatistic">

</DOUBLECLICK>

 

As seen above, the double-click functionality is invoked from the "Add Statistic" menu item instead of the first menu item of the panel-specific menu. If you specify <DOUBLECLICK name =""> i.e., if the name attribute is specified as "" (null) then no action gets executed. By default, if this tag is not found then the action executed is that associated with the first menu-item of panel-specific menu (this is for backward compatibility).

 

Map-Specific Menu

 

As discussed earlier, the map-specific menu configuration files are located either in <Web NMS Home>/users/<username>/ mapmenus directory or in <Web NMS Home>/mapdata/menus directory. When a double-click function is to be associated with a map-specific menu (i.e., menu displayed for a specific a map), the <DOUBLECLICK> tag must be specified in the map-specific menu configuration file (e.g. failedobjectsmenu.xml).

 

The order of prioritizing the search for <DOUBLECLICK> tag for map-specific menus by the client framework are as follows :

The three possible <DOUBLECLICK> entries that can be made in the map-specific menu configuration files, are same as that explained for Panel-Specific Menu.

 

Object-Specific Menu

 

For all the map objects that get displayed in a map, the corresponding object-specific menu configuration files located either in <Web NMS Home>/users/<username>/mapmenus directory or in <Web NMS Home>/mapdata/menus directory gets selected. The menu configuration files of managed objects that get displayed in the Network Database panel are located either in <Web NMS Home>/users/<username>/listmenus directory or in <Web NMS Home>/listmenus directory.

 

The order of prioritizing the search for <DOUBLECLICK> tag for object-specific menus (displayed for Map and for Network Database panels) by the client framework are as follows :

The three possible <DOUBLECLICK> entries that can be made in the Object-Specific menu configuration files, is same as that explained for Panel specific menu.



Copyright © 2011, ZOHO Corp. All Rights Reserved.