Previous Topic: Putting It All Together

Next Topic: Generating and Building Your Applications

Creating a Top-Level Menu

CA Plex creates standard OS/400 programs that you can call from any System i menu system. OBASE provides its own menu system that you will use to create a top-level menu.

To create a top-level menu:

  1. This is the first time you will create an inheritance triple to inherit from a function. Change the Object Browser to display functions.
  2. In the Model Editor, change the object type to function, and add the following triple:

    Project Manager is a OBASE/Default Objects.MDI Template

    Note: To get to Default Objects.MDI Template in the Object Browser, display entities, make sure library objects are showing, and expand OBASE/Default Objects.

    This defines the unscoped function, Project Manager. Remember, to view unscoped functions in the Object Browser, you must change the Object Browser to view functions. Until now, you have only worked with scoped functions, which you viewed with the Object Browser set to show entities.

  3. Expand the Project Manager function to show the objects it scopes.

    Project Manager has two functions scoped to it:

    Next, you modify the top-level menu to add menu items to it.

  4. Open Project Manager.MDI Frame Processing.MDI Frame.
  5. In the Panel Palette, select the Selector text region.
  6. In the Design Window, move the Selector text region to the center of the panel.
  7. Add the following static text items to the Selector text region. For more information, see Adding Static Text in the chapter "Modifying the User Interface."

    1. Work with projects
    2. Work with employees

  8. Rearrange the static texts to make them visible:

    PLEX--Creating a TopLevel Menu (2)

  9. Add the following logical events to the panel. For more information, see To Add a Logical Event to the Edit Project Panel in the chapter "Defining Owned By Relationships."

    Work with projects
    Work with employees

  10. Add the grid selector values 1 and 2 to the panel, and associate them with the corresponding logical events. For more information, see Creating a Subfile Option in the chapter "Defining Owned By Relationships."

    Instead of adding them under the Grid region’s menu selector field, you add them under the Selector text region’s menu selector field.

  11. Close the panel and save your changes.
  12. Edit the function Project Manager.MDI Frame Processing so that the application calls the function Project.Grid Maintenance Suite.Edit Grid User Interface when the Work with projects logical event is triggered. For more information, see Adding Functionality to Logical Events in the chapter "Defining Owned By Relationships."

    Choose the post point that follows the 0 Additional Events edit point.

  13. Click in the Action Diagrammer under the construct you just created. The Action Diagrammer should look like this:

    PLEX--Creating a TopLevel Menu (3)

  14. Add another instruction to the function so that it calls the function Employee.Maintenance Suite.Maintenance UI when the Work with employees logical event is triggered.

    When your action diagram is finished, it should look like this:

    PLEX--Creating a TopLevel Menu (4)

  15. Close the function and save your changes.