This invention relates to menu structures, and in particular actions to be taken upon selection of a menu item.
When an item is selected from a menu, an action associated with the menu item is launched directly. This does not take advantage of functions common to several items in the menu. This also fails to take into account the current state of the system.
A structure for defining a menu would preferably associate numerous variables with the menu items, and selection of a menu item would execute any of various functions, some of which may be common subsystems, depending on the variables associated with the menu items.
According to one aspect, the invention provides a method of responding to selection of a menu item. A launch type of the menu item is determined, the launch type being associated with the menu item in a definition of the menu item. If the launch type indicates that a list is to be presented, a list subsystem is invoked and the value of a parameter associated with the menu item in the definition of the menu item is passed as an input to the list subsystem. If the launch type indicates that a form is to be presented, a form subsystem is invoked and the value of the parameter is passed as an input to the form subsystem. If the launch type indicates that a custom action is to be performed, a custom action defined by the value of the parameter is invoked.
According to another aspect, the invention provides a method of defining a menu. For each of a plurality of menu items, a value of a label is stored in association with the menu item. For each of the plurality of menu items, a value of a launch type is stored in association with the menu item. For each of the plurality of menu items, a value of a parameter is stored in association with the menu item.
The methods of the invention may be stored as processing instructions on computer-readable storage media, the instructions being executable by a computer processor.
The invention allows different actions to be performed on selected menu items, depending on a launch type of the item included in the definition of the menu item. The structure of the definition of the menu items also stores a parameter for use when performing the defined action type. For some launch types, the parameter is an input to a common subsystem. For other launch types, the parameter is a class name of an object, with a specific action defined for the object.
The features and advantages of the invention will become more apparent from the following detailed description of the preferred embodiment(s) with reference to the attached figures, wherein:
It is noted that in the attached figures, like features bear similar labels.
Referring to
The menu described with reference to
Referring to
If the value of the variable “launchtype” of the selected item is not equal to “action”, then at step 56 it is determined whether the value of the variable “launchtype” of the selected item is equal to “list”. If so, then at step 58 a list subsystem is invoked, using the value of “className” as an input to the list subsystem. The list subsystem determines the specific type of List window to open using the value of “className”. Using the value of “className”, the list subsystem determines the type of entity selected and determines the format of the list. The format of the list is pre-defined within the list subsystem for all entity types, along with information about performing searches for the type of entity indicated by the value of “className”. The format is preferably stored as a text file in XML format which describes the layout of the contents of the List window. The information contained in the list subsystem includes data to be displayed as well as filters to be applied. Using the value of “className”, the list subsystem also determines the specific entity referred to by the selected menu item, both the entity type and specific entity derivable from the value of “className”. The list subsystem opens a List window, preferably directly into the display manager for the application from which the menu was accessed, and populates the List window with current data for the specific entity.
If the value of the variable “launchtype” of the selected item is not equal to “list”, then at step 60 it is determined whether the value of the variable “launchtype” of the selected item is equal to “form”. If so, then at step 62 a form subsystem is invoked, using the value of “className” as an input to the form subsystem. The form subsystem determines the specific type of Form window to open using the value of “className”. Using the value of “className”, the form subsystem determines the type of entity selected and determines the format of the form. The format of the form is pre-defined within the form subsystem for all entity types. The format is preferably stored as a text file in XML format which describes the layout of the contents of the Form window. Using the value of “className”, the form subsystem also determines the specific entity referred to by the selected menu item, both the entity type and specific entity derivable from the value of “className”. The form subsystem opens a Form window, preferably directly into the display manager for the application from which the menu was accessed.
If the value of the variable “launchtype” of the selected item is not equal to “form”, then the variable “launchtype” has an unrecognized value and an error occurs at step 64. Ideally this should not happen because when the method described with reference to
As an alternative, other launch types and their associated actions can be defined and included in the menu definition. The use of the value of the variable “className” will depend on the logic performed for the launch type. A graph launch type and subsystem, a map launch type and subsystem, and a tree launch type and subsystem are examples. In the example of a graph launch type, for example, the method described above with reference to
Broadly, when a menu item is selected, the launch type defined for the menu item is determined, and an action taken based on the launch type. If the launch type indicates that a custom action is to be performed, then a parameter defined for that menu item is used to invoke the custom action. If the launch type indicates that a list is to be displayed for the menu item, then a list subsystem is invoked using the parameter defined for that menu item as an input. If the launch type indicates that a form is to be displayed for the menu item, then a form subsystem is invoked using the parameter defined for that menu item as an input. Other launch types and their associated actions may also be defined.
The logic of the methods is preferably in the form of software, and may be stored as instructions on computer-readable storage media which can cause a computer processor to act upon selection of a menu end item. The definition of a menu, including associations of labels, launch types, and parameters for menu items, may be stored on computer-readable storage media which can cause a computer processor to present a menu.
The embodiments presented are exemplary only and persons skilled in the art would appreciate that variations to the embodiments described above may be made without departing from the spirit of the invention. For example, the menu may be defined using other means than an XML file. As another example, the order in which the value of the “launchtype” variable is determined may be varied, and the method may be any method which is logically equivalent to that described above with reference to