SubMenuStock

As this report shows information about inventory information, we will amend the Stock menu to include a new menu item to initiate the report. Specifically, changes will be made in the {create-menubar} method of the SubMenuStock class.

create-menubar

The {create-menubar} method defines the menu items that are available when the user clicks the main Stock menu; it will be extended to support the inventory search by car manufacturer functionality. Figure 16-2 shows the additional code required.

You can see in Figure 16-2 that we added another MenuAction to the Stock SubMenu, which is labeled Most Manufacturer Report. When the user clicks this menu item, he or she will execute the {most-manufacturer} method.

Figure 16-2. SubMenuStock.create-menubar ...

Get Enterprise Curl now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.