Menu Examples for Xephr Menu Service

Using the screen template created earlier, we will create a menu screen.  

Your user must be assigned the global variable NEXTMENU for this menu to work.

See Also

Menu Objects

Xephr Menu Service for Standard Blocks

Menu Creation Example

  1. Select the Group Information object.  Expand it, and select the group to which you wish to add the menu screen.

  2. Right click on the group and select Create ->Entity.

  3. Click on the Screen bullet.

  4. Click on the Next button at the bottom right of the screen.

  5. In the Entity Name property, type MENU as the entity name.

  6. Leave the Datasource property set to (use default), since there is only one datasource for the Xephr® install.

  7. In the Based On property, select SCREEN_TEMPLATE, which is the template that we created earlier.

  8. Set the Default Mode property to List View.   

  9. Leave the Body Style, Editable Field Style, Non-Editable Field Style, Lov Style, and Link Style properties set to (from parent), as these styles will be taken from the SCREEN_TEMPLATE for this screen.

  10. Click on the Next button at the bottom right of the screen.

  11. In the Block Name property, enter MENUPAGE as the name of the block.

  12. In the Block Type property, select Standard Block.

  13. Set the Query Type property to Xephr Service.

  14. Set the Datasource property to XEPHR_MENUS as this is the datasource that contains the menu information for Xephr.

  15. In the Xephr Service property, select Xephr Menus.

  16. Set the Create Heading checkbox to off to indicate that no heading should be created.

  17. In the Mode Selection section, set the List checkbox to on.  We will only have one block and mode for this screen.

  18. In the Scheme Selection section, select List as we will be displaying multiple menu objects on the screen.

  19. Click on the Next button at the bottom right of the screen.

  20. The Constructing Xephr Service screen is displayed.  

  1. Click on the Field column header to select the Field checkbox for all columns.

  2. Click on the Label checkbox for the Display Text column only.

  3. Click on the Next button at the bottom right of the screen.

  4. The Ordering Fields screen is displayed next.  The columns are initially ordered as they were listed on the previous screen.  To move a field up or down, highlight the desired field by selecting it, and click on the Move Up or Move Down buttons on the right of the screen.  Move the fields until they are in the following order:
    DISPLAY_TEXT
    MENU_NAME
    ACTION_NAME
    MENU_ORDER
    TARGET_IS_MENU
    NEW_PAGE
    MODE

  5. Click on the Next button at the bottom of the screen to continue.  The Option to Add More screen is displayed.  We have no more blocks to add, so click on the Finish button.

  6. The new entity is added to the initially selected group.  In the Explorer Tree, the new entity will be displayed, expanded with all blocks shown.

  7. Click on the Save button in the main toolbar to save the new screen entity.

  8. Left click on the MENU entity to select it and double click to display the property sheet.

  9. In the Title property, enter the text: Xephr Applications Menu.

  10. Set the Display Only property to true.  The menu screen does not allow modifications, so the fields all need to be display only.

  11. Left click on the LEFT_MENU block in the Explorer Tree and display the property sheet.

  12. Set the On Edit, On New, and On QBE properties to false.

  13. Expand the LEFT_MENU block in the Explorer Tree.

  14. Hold down the Shift key and left click on each of the following fields to select them.
    QUERY
    LIST
    NEW
    EXECUTE_SEARCH
    SAVE
    DELETE
    CREATE

  15. Click on the [Delete Current] button to delete these links.  None of them are necessary on this screen.

  16. When the Confirm Delete pop-up is displayed, select Yes.

  17. When the Delete Results message is displayed, select Ok.

  18. You'll get another set for each of the fields selected.

  19. Click on the Save button in the main toolbar to save the changes.

  20. In the Explorer Tree, expand the MENUPAGE_CONTAINER block.  Then expand the MENUPAGE block.

  21. Left click on the DISPLAY_TEXT field to select it.  Double click to display the property sheet.

  22. In the Hyperlink To field, enter the following text.  

    This code says that if the target_is_menu field for the record is Y, when the user clicks on the link, reopen the menu screen with displaying the new menu, otherwise, if the new_page field for the record is set to Y, when the user clicks on the link, open the entity in a new screen in its default mode.  Otherwise, open the entity in this screen, in its default mode.:
    if ( $$.TARGET_IS_MENU$$ == 'Y')
    {
    SetGlobalValue( 'NEXTMENU', $$.ACTION_NAME$$);
    Show( 'MENU');
    }
    else
    {
    if ( $$.NEW_PAGE$$ == 'Y')
    {
    ShowInWindow($$.ACTION_NAME$$, $$.MODE$$, '600', '800', '0', '0');
    }
    else
    {
    ExecuteShow($$.MODE$$,$$.ACTION_NAME$$);
    }
    }

  23. In the Explorer Tree, expand the MENUPAGE_HEADER block

  24. Left click on the L_DISPLAY_TEXT field to select it and then display the property sheet.

  25. In the Contents field, enter Menu/Program.

  26. Hold down the Shift key and left click on the following fields to select them:
    MENU_NAME
    ACTION_NAME
    MENU_ORDER
    TARGET_IS_MENU
    NEW_PAGE
    MODE

  27. Double click to display the multi-select property sheet and set the Visible property to false.  We do not need to display any of these fields on the screen.

  28. Left click on the MENUPAGE block to select it and display the property sheet.

  29. In the Param MENU_NAME property, enter $$NEXTMENU$$.  This global determines which menu will be displayed on this block.  It is set at the user level, and then again when a menu is selected from this block.

  30. Click on the Save button in the main toolbar to save the changes.

  31. Right click on the MENU entity and select Designer Frame.

  32. Hold down the Shift key and left click on the fields with the text Menu/Program and DISPLAY_TEXT in the Designer Tool.

  33. Double click on the DISPLAY_TEXT field to display the Multi-Select property sheet.

  34. In the Width property, enter 300.

  35. Click on the Save button in the main toolbar to save the changes.

  36. Now the screen has been created, but no menus or menu links have been created.

  37. In the Explorer Tree, right click on the Menu Information object and select Create->Menu.

  38. The property sheet will be displayed for the new menu.

  39. In the Menu Name property, enter MM.

  40. In the Description property and Display Text property, enter Main Menu.

  41. Click on the Save button in the main toolbar to save the new menu.

  42. Now the main menu has been created, and we must add menu links to display on the main menu.  There are two ways to do this.  We are going to add two links, using both methods.

  43. In the Explorer Tree, expand the REPORTS group.

  44. Left click on the OPEN_INVOICES entity, right click to display the menu, and select Add to Menu.

  45. The Create New MenuLink screen is displayed.

  46. In the Select Parent Menu area, left click on the MM link to select the MM menu as the menu to which you are adding the report.

  47. Leave the Default Mode property set to Parameter Form.

  48. In the Display Text property, enter Open Invoices by Customer.  This is the text that will be displayed on the menu.

  49. Click on the Ok button.

  50. The entity is expanded to display the menu link added to the entity.

  51. The Menu Information object and MM menu object are also expanded so that you can see that it was added there as well.

  52. Click on the Save button in the main toolbar to save the new menu link.

  53. Right click on the MM menu to display the menu.  Select Create->Menulink.

  54. In the Entity property, select the OPEN_INVOICE_TOTALS entity.

  55. In the Z Order property, enter 10, so that this menu link will be displayed after the OPEN_INVOICES menu link.

  56. In the Display Text property, enter Open Invoices with Totals.

  57. Set the New Window property to true.

  58. Leave the Execution Mode property set to Parameter Form.

  59. Click on the Save button in the main toolbar to save the new menu link.

  60. Since the MENU screen is the default menu screen for the repository, we need to make sure it's assigned as the default Welcome Entity in the Repository Configuration.

  61. Select the Repository Configuration object in the Explorer Tree and display the property sheet.

  62. In the Welcome Entity property, enter MENU.

  63. Click on the Save button in the main toolbar.

  64. To test the new screen entity, highlight it by selecting it, and click on the Run button in the main toolbar.

  65. The Preparing to Run screen is displayed.  Click on the Run button.

  66. The screen will be run in the browser.

Xephr is a registered trademark of NDS Systems, LC.

Copyright © 2007 NDS Systems LC.