Search code examples
cuba-platform

Pin a tab in Cuba Platform app or protect from closing


I want to show some statistics and links at a welcome/home tab. How can I pin a tab or protect from closing?

It is a good solution or should I use the mainwindow for the "dashboard"?


Solution

  • You can override the preClose() method of the AbstractWindow class. If this method always returns false, then you window will never be closed.

    @Override
    protected boolean preClose(String actionId) {
        return false;
    }