EditorScreenFacet is essentially a ScreenFacet with an extended set of options for opening the editing screen.

Component’s XML-name: editorScreen.


In addition to all the attributes that ScreenFacet has, EditorScreenFacet has its 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="employee" 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 Component Hierarchy panel and use the Handlers tab of the Component Inspector panel.

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


Programmatic registration of the event handler: use the addAfterCloseEventListener() component method.


Programmatic registration of the event handler: use the addAfterShowEventListener() component method.


Programmatic usage: call the setOptionsProvider() component method.


Programmatic usage: call the setInitializer() component method.


Programmatic usage: call the setTransformation() component method.


To pass entity to the opening screen, EditorScreenFacet has EntityProvider.

private DataManager dataManager;

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

    return user;

Programmatic usage: call the setEntityProvider() component method.


To pass data context to the opening screen, EditorScreenFacet has ParentDataContextProvider. To learn more about parent DataContext, see the DataContext page.

private DataContext dataContext;

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

Programmatic usage: call the setParentDataContextProvider() component method.

All XML Attributes

You can view and edit attributes applicable to the facet using the Component Inspector panel of the Studio’s Screen Designer.