Using the “Scan Menu” action

To simplify the creation of a Menu structure from the KB, the K2BMenu Pattern includes an action called “Scan Menu”.

K2BMenuScanMenuScreenshot
Screenshot

This action scans the contents of the KB, and searches for:

  1. Instances of the K2BEntityServices Pattern with the “Include In Menu” property activated.
  2. Web Panels created using K2BWebPanelDesigner with the “Include In Menu” property activated.

After searching for these objects, the corresponding WebObject nodes are added to the instance. If the KB uses GeneXus Modules, SubMenus will be added to the structure to organize the new items as they are organized in the KB.

The generated structure can be modified manually, and it is also possible to update it using the “Scan Menu” action repeatedly to include new items.

When the action is executed on an existing menu, its behaviour is:

  1. If an item is present in the menu, and the corresponding object has its “Include In Menu” property set to false, the item is deleted from the menu. Important: The item is deleted only if its location inside the menu was not modified manually by the developer.
  2. New WebObject nodes are added to the structure matching the items found in the KB that are not in the structure yet. New SubMenu nodes may be added to match the structure of the KB.

The process writes a log of its execution to the Output window in GeneXus.

K2BMenuScanMenuLog
Execution log