How to create and use additional entity edit screens?

Hi,
I already have app$Entity.edit screen and created additional one and want to open it from main menu item. But I faced several problems:

  1. when I named my new screen app$Entity1.edit I got such error: IllegalArgumentException: MetaClass not found for app$Entity1
  2. When I named the new screen app$Entity.edit1 I got this error:
    GuiDevelopmentException: 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.

How should I name my screen? Or do something else?

Hi,
You cannot open an editor from main menu, because editors require passing an entity instance to edit. But you can register a Runnable in screens.xml with an arbitrary identifier (see “class” attribute in https://doc.cuba-platform.com/manual-6.6/screens.xml.html), load or create an instance and invoke your editor as follows:

AppBeans.get(WindowManagerProvider.class).get().openEditor(...)