User default screen - error on AbstractEditor


After set the default screen for the user as the entity editor (AbstractEditor), after logging in I get a login error (red frame with information). There is no additional information in the log file.
After clicking on the notification, the login was successful, but the default screen was not opened.
This is not happening on the screen type: AbstractLookup.


I found exception message (I overwrited login screen and showUnhandledExceptionOnLogin method).

Can’t find action windowCommit. This may happen if you are opening an AbstractEditor-based screen by openWindow() method, for example from the main menu.
Use openEditor() method or give the screen a name ended with ‘.edit’ to open it as editor from the main menu.


Replace existing bean: WebWindowManager

1). create new custom WebWindowManager

public class CustomWebWindowManager extends WebWindowManager {

    private static final Logger log = LoggerFactory.getLogger(CustomWebWindowManager.class);

    public static final Pattern ENTITY_SCREEN_PATTERN = Pattern.compile("([_A-Za-z]+\\$[A-Z][_A-Za-z0-9]*)\\.(.+)");

    protected Metadata metadata;

    public CustomWebWindowManager() {

    public void openDefaultScreen() {
        String defaultScreenId = webConfig.getDefaultScreenId();

        if (webConfig.getUserCanChooseDefaultScreen()) {
            String userDefaultScreen = userSettingService.loadSetting(ClientType.WEB, "userDefaultScreen");
            defaultScreenId = StringUtils.isEmpty(userDefaultScreen) ? defaultScreenId : userDefaultScreen;

        if (StringUtils.isEmpty(defaultScreenId)) {

        if (!windowConfig.hasWindow(defaultScreenId)) {
  "Can't find default screen: {}", defaultScreenId);

        MetaClass metaClass = null;
        String windowType = null;

        Matcher matcher = ENTITY_SCREEN_PATTERN.matcher(defaultScreenId);
        if (matcher.matches()) {
            metaClass = metadata.getClass(;
            windowType =;

        WindowInfo windowInfo = windowConfig.getWindowInfo(defaultScreenId);
        Window window = null;

        if (windowType.equals("edit")) {
            Entity entity = metadata.create(metaClass);
            window = openEditor(windowInfo, entity, WindowManager.OpenType.NEW_TAB);
        } else {
            window = openWindow(windowInfo, WindowManager.OpenType.NEW_TAB);

        // in case of window is created by Runnable instance
        if (window == null) {

        if (!webConfig.getDefaultScreenCanBeClosed()) {
            WebAppWorkArea workArea = getConfiguredWorkArea(createWorkAreaContext(window));
            if (workArea.getMode() == Mode.TABBED) {
                TabSheetBehaviour tabSheetBehaviour = workArea.getTabbedWindowContainer()

                HasComponents tabLayout = WebComponentsHelper.getComposition(window).getParent();
                String tabId = tabSheetBehaviour.getTab(tabLayout);

                tabSheetBehaviour.setTabClosable(tabId, false);


2). add to web-spring.xml

<bean id="cuba_WebWindowManager" class="" scope="prototype"/>