EditorScreenFacet is essentially a ScreenFacet with an extended set of options for opening entity edit screens.

Component’s XML-name: editorScreen.


In addition to the attributes of ScreenFacet, EditorScreenFacet has the following own attributes:

  • addFirst - defines whether a new item will be added to the beginning or the end of the collection. It affects only standalone containers; for nested containers, new items are always added to the end.

  • container - sets a CollectionContainer. The container is updated after the screen is committed. If the container is nested, the framework automatically initializes the reference to the parent entity and sets up data context for editing compositions.

  • editMode - sets the screen edit mode, corresponds to the EditMode enum:

    • CREATE - to create a new entity instance.

    • EDIT - to edit an existing one.

  • entityClass - the full name of an entity class.

  • field - sets the EntityPicker component id. The framework sets the committed entity to the field after a successful editor commit if the field is set.

  • listComponent - sets the list component id. The component is used to get the container if it is not set. Usually, the list component is a Table or DataGrid displaying the list of entities.

Usage example:

<window xmlns="http://jmix.io/schema/ui/window"
    <data readOnly="true">
        <collection id="departmentsDc"
            <fetchPlan extends="_base">
                <property name="employees" fetchPlan="_base"/>
            <loader id="departmentsDl">
                    <![CDATA[select e from uiex1_Department e]]>
        <editorScreen id="editorScreen"
        <dataLoadCoordinator auto="true"/>
        <screenSettings id="settingsFacet" auto="true"/>
        <button id="openEditBtn"
                caption="Open an editor screen"

Events and Handlers

To generate a handler stub in Jmix Studio, select the facet in the screen descriptor XML or in the Jmix UI hierarchy panel and use the Handlers tab of the Jmix UI inspector panel.

Alternatively, you can use the Generate Handler button in the top panel of the screen controller.


AfterCloseEvent is sent after the screen configured by the facet is closed. See AfterCloseEvent for details.


AfterShowEvent is sent after the screen configured by the facet is shown. See AfterShowEvent for details.


The EntityProvider delegate method allows you to pass an entity instance to the opening screen:

private DataManager dataManager;

@Install(to = "editorScreen", subject = "entityProvider")
private User editorScreenEntityProvider() {
    User user = dataManager.create(User.class);

    return user;

To register the entity provider programmatically, use the setEntityProvider() method.


It is a handler that accepts the new entity instance and can initialize it before show in the editor screen. See Initializer for details.

To register the event handler programmatically, use the setInitializer() method.



The ParentDataContextProvider delegate method allows you to pass parent DataContext to the opening screen:

private DataContext dataContext;

@Install(to = "editorScreen", subject = "parentDataContextProvider")
private DataContext editorScreenParentDataContextProvider() {
    return dataContext;

To set the parent DataContext supplier programmatically, use the setParentDataContextProvider() method.



It is a handler that is invoked after the entity is selected and validated in the editor screen. See Transformation for details.

All XML Attributes

You can view and edit attributes applicable to the facet using the Jmix UI inspector panel of the Studio’s Screen Designer.