PL-10384 Default screen is not opened in case of extended main window with side menu

This commit is contained in:
Daniil Tsarev 2018-02-13 11:19:54 +04:00
parent 16b9650054
commit d5a51eaaa2
5 changed files with 21 additions and 9 deletions

View File

@ -2053,6 +2053,11 @@ public class DesktopWindowManager extends WindowManager {
return false;
}
// just stub
@Override
public void openDefaultScreen() {
}
protected class DesktopNotificationAction implements Action {
private Type type;

View File

@ -1265,6 +1265,13 @@ public abstract class WindowManager {
}
}
/**
* Opens default screen. Implemented only for the web module.
* <p>
* Default screen can be defined with the {@code cuba.web.defaultScreenId} application property.
*/
public abstract void openDefaultScreen();
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/**

View File

@ -107,4 +107,11 @@ public class AbstractMainWindow extends AbstractTopLevelWindow implements Window
userIndicator.refreshUserSubstitutions();
}
}
@Override
public void ready() {
super.ready();
getWindowManager().openDefaultScreen();
}
}

View File

@ -1769,7 +1769,8 @@ public class WebWindowManager extends WindowManager {
return !window.getId().equals(defaultScreenId);
}
public void openDefaultWindow() {
@Override
public void openDefaultScreen() {
String defaultScreenId = webConfig.getDefaultScreenId();
if (webConfig.getUserCanChooseDefaultScreen()) {

View File

@ -22,7 +22,6 @@ import com.haulmont.cuba.gui.components.mainwindow.AppMenu;
import com.haulmont.cuba.gui.components.mainwindow.AppWorkArea;
import com.haulmont.cuba.gui.components.mainwindow.FoldersPane;
import com.haulmont.cuba.gui.components.mainwindow.FtsField;
import com.haulmont.cuba.web.App;
import com.haulmont.cuba.web.WebConfig;
import com.haulmont.cuba.web.gui.components.WebComponentsHelper;
import com.haulmont.cuba.web.toolkit.ui.CubaHorizontalSplitPanel;
@ -96,11 +95,4 @@ public class AppMainWindow extends AbstractMainWindow {
expand(workArea);
}
}
@Override
public void ready() {
super.ready();
App.getInstance().getWindowManager().openDefaultWindow();
}
}