|
MenuConfig Element |
|
|
MenuConfig element defines how the Javascript steer file is generated. The element must be placed into the Common Definitions page and its properties must be specified.
Security Domain Name If the menu options need to be populated according to the authorities of the current user, a Security component (e.g. mor.Security) should be configured in the project and its security domain name should be given to this property. Note: This value is usually given as "main". Connection Name Menu service retrieves the menu options from a relational database. A JDBC connection must be configured with "mor > RelDBConnection" element and its name must be given to this property. The SQL statement that will provide the options of the menu.
Menu service expects that the following columns exist in the result set: H : Menu Hierarcy. The value of this mandatory column should contain 2-byte digits (between 01 and 99) for each level. Sample hierarchy values:
The result set must be sorted according to this column. CPNAME : The name of a security checkpoint. It is not mandatory. If the menu options are generated according to the authorities of the current user then the value of this column should be either blank or the name of the one of the checkpoints existing in the security system. HREF : The hyperlink for the menu option. The menu service takes no responsibility on how the value of this column is used. However if the value ends with "rand=" definition, the service appends "getRand()" javascript function to the value so that each time the menu option is selected the user a new request is sent to the server. Please not that the query result set may contain more columns and they can be used as symbols in the Menu JScript Parts properties freely. Menu JScipt Parts are used to define Javascript code snippets to build the menu steer file dynamically by evaluating and resolving the embedded MScript functions and symbols in it. The Menu service class provides the following MScript symbols to assist the menu generation:
Top The part to place at the top of the menu steer Javascript file. Menu Section Begin The part to place before the each menu option. Menu Item The part the defines the each menu option. Menu Section End The part to place after the each menu option. Bottom The part to place at the bottom of the menu steer Javascript file. Generate By This property defines the method for the building menu tree. If option "1. H Column" is selected then the menu is built according to the H column in the result set as explained above. If option "2. ID and PARENTD_ID Columns" is selected, then the result set must contain ID and PARENT_ID columns. The PARENT_ID column should contain the id of the parent option's record number. If the value of PARENT_ID column is -1 for an option then that option is top level. A query example according to ID and PARENT_ID columns:
Show Unauthorized Menus as Disabled If the value of this property is left as false then the menu options that the current user has not authority on it is not included in th menu. If it is desirable that option is visible on the menu but disabled for the use then set this property should be set to true.
|