How to create a mandatory start screen in Cuba?

How to create a mandatory start screen in Cuba ?
i.e. The screen will be having some input fields and it should not show any menu items at the start ,
once the user enters values after validation it should show other screens in menu.

1 Like

Hello @Vignesh_Iyer

You should create an extension of com.haulmont.cuba.web.DefaultApp class and replace default implementation in the web-spring.xml file:

<bean name="cuba_App" class="" scope="vaadin"/>

Then override String routeTopLevelWindowId() method to return your mandatory screen id. And just show default main screen when user passes validation:

// in App extension


AppUI ui = AppUI.getCurrent();
Screens screens = ui.getScreens();

Screen screen = screens.create("mainWindow", OpenMode.ROOT);;


Hi Daniil Tsaryov,
I am working on 6.10 version and not able to access the removeallWindows() method


Okay, for 6.10 version an implementation will be the following:

// in mandatory screen

protected TextField secret;
protected WindowConfig windowConfig;

public void checkInput() {
    if (!"top secret".equals(secret.getValue())) {
        showNotification("Wrong", NotificationType.WARNING);


    ((WebWindowManager) getWindowManager())

Please check demo project: (70.1 KB)