Re-using the Responsive screen demo

Hi team.
How can I make the buttons on the demo to display a screen that I have generated after creating the entities.Capture

am using a registered version of cuba studio v.8.6.2

Hi!

The given screen is extention of the AppMainWindow and it overrides a content of main window. To show screens you must to add to your main window layout workArea component. Check the documentation about main window layout Main Window Layout - CUBA Platform. Developer’s Manual.

Code example:

<main:workArea id="workArea" width="100%" height="100%" >
    <main:initialLayout spacing="true" margin="true">

    </main:initialLayout>
</main:workArea>

To show some screen by click on the SideMenu menu item you should add a Consumer, that will be invoked when a user clicks on the item. Check the documentation about SideMenu SideMenu - CUBA Platform. Developer’s Manual.
In the dashboard sample we have already added Consumer and it invokes buttonNotImplementedAction method.

sideMenu.addMenuItem(
        sideMenu.createMenuItem("orders",
                getMessage("orders"),
                "icons/list.png",
                menuItemAction -> buttonNotImplementedAction())
);

We should replace it by openWindow() method that will open our screen.

sideMenu.addMenuItem(
        sideMenu.createMenuItem("orders",
                getMessage("orders"),
                "icons/list.png",
                menuItemAction -> openWindow("demo$Customer.browse", WindowManager.OpenType.NEW_WINDOW))
);