Menu Setup

Overview

In any generated application, one of the key features is the ability for users to select, view, and update the tables in the application's underlying database. This ensures that users have direct access to manage and interact with the data that drives the application. CodeStencil enhances this functionality by offering a high level of flexibility. It allows users to specify which table or set of tables can be accessed directly through the application's menus. The user defines these menus, giving them complete control over how data access is structured and presented. Furthermore, CodeStencil allows users to manually create additional custom menus, offering an even more tailored experience for navigating and managing the data. This level of customization ensures that the application meets specific business requirements while maintaining ease of use for the end user.

You can access the Menu Setup interface from Layout | Menu

 

  1. Menu List - This grid displays the list of all the menu items that will be created during code generation. It consists of table names (automatically imported during database import or schema generation) and other menu items you added manually. Two columns are displayed here: the menu text and the path the menu navigates to when clicked at runtime.
  2. Preview - This button allows you to preview what your generated menu is like in code.

     This preview is for a menu used in a DevExpress Blazor App. It shows the generated code.
  3. Format - This button allows you to format the way the menu will look. See Setup Menu Format
  4. Import - This button allows you to import the table names of the tables defined in your Schema Dictionary. See Import Table Names
  5. Add Menu - This allows you to add a menu manually. For example, you may want to show the menu for login, profile, or any other item that has nothing to do with tables.
  6. Edit Menu - This button lets you update an existing menu.
  7. Delete Menu - This button lets you delete an existing menu.

Implementation

To incorporate your menu definitions into the code generation process, trigger the Expander labelled MENU_ITEMS. This step is crucial because, during the application development lifecycle, CodeStencil uses this Expander to generate and store the menu structure or code. When you complete the configuration in the menu setup form, the system automatically saves the corresponding menu definitions within this Expander.

The MENU_ITEMS expander is a placeholder for all menu-related items, ensuring that your selections are captured and applied during code generation. As a result, when the code is generated, the correct menus will be included based on your predefined choices. Without this step, the menus won’t be integrated into the final output, and the application may lack the necessary navigation structure. Using this expander, you streamline adding, managing, and updating menus in your application, making the menu configuration process an integral part of CodeStencil's automated code generation.

This automatically produces this after code generation:

 


Was this article helpful?