MinorMenu

The menus (MM) form the backbone of the menu system of Effector (Main menu) - that is the top-level menus. These items mark off functions related based on certain criteria. These criteria can be differences arising from the organizational structure or role. Each menu has to contain at least one screen, but typically more than one screen is assigned to one MM. For further information on screens see Screens.

Location in the system

Menus may occur as reference at various locations and, in general, appear along with references to screens, creating a unique identifier for displaying a given screen. As we have seen it in Architecture, a screen may belong to several menus as the display or management of the same data may necessary in various roles within the company.

The figure below shows its direct connection/location within the system that corresponds with its main task, that is the creation of the menu system.

MM in the system

The figure below demonstrates its location within the system from the point of view of its uses, through its relationships.

MM as reference

Its connection, where it is or may be present as a reference:

Its location in the file system is in the MM folder within the XML package. Due to naming conventions concerning file names, the name of the file must be the same as that of the MM.

Available features

The structure of menus is relatively simple; therefore, the number of available features is small, but they play a rather important role in creating the Effector user interface.

In an MM XML, the following settings are available:

  • Setting the screens belonging to the menu
  • Regulating the visibility of screens belonging to the menu

Example:

<MinorMenu xmlns="http://effector.hu/schema/ns/minormenu">  
    <Menu>
        <Item>
            <Caption>MasterData</Caption>
            <ResourceName>ScreenTorzsadatok</ResourceName>
        </Item>
        <Item>
            <Caption>Admin</Caption>
            <ResourceName>ScreenAdmin</ResourceName>
            <Visible type="Simple" return="boolean">'[##Session.UserID##]'=='1'</Visible>
        </Item>
    </Menu>
</MinorMenu>

Setting the screens belonging to the menu

The structure of the configuration file is simple.

Within a MinorMenu, screens are defined by listing items in a <Menu> collection. The caption to be displayed is entered in the <Caption> tag, while the screen’s XML file name is inserted in the <ResourceName> tag.

    <Item>
        <Caption> MasterData</Caption>
        <ResourceName>ScreenTorzsadatok</ResourceName>
    </Item>

Definition:

  • ResourceName: Contains the reference to the definition of the screen. Its value is the file name of the screen configuration file without extension.
  • Caption: caption of the screen to be displayed in the menu system
  • NewObjectCount: using an arbitrary SQL statement, any data can be displayed next to the name of the screen, which also appears one level up in the menu system.

Regulating the visibility of screens

It is possible to set up visibility rules for each screen within the menu, which will be evaluated when creating the menu. This visibility rule can be set in the MinorMenu\Menu\Item\Visible node (see the example above). As for its syntactics, it is of RuleValueType, on which you can find more info at Rules.

Here, we shall point out that visibility rules used in case of menus and screens form the first line of the structure of user rights. This way, data visibility can be restricted on menu or screen level for users not having appropriate user rights due for example to not belonging to a certain group or division.

  • Last update: 25 weeks 5 days ago
  • Effector