XML Descriptors

A screen descriptor is an XML file containing the declarative definition of visual components, data components, and some screen parameters.

Use Studio screen designer to set up your XML descriptor.

For example, look at the XML descriptor of the edit screen:

<window xmlns="http://jmix.io/schema/ui/window"
        <instance id="orderDc"
            <fetchPlan extends="_base"/>
        <dataLoadCoordinator auto="true"/>
        <screenSettings id="settingsFacet" auto="true"/>
        <action id="windowCommitAndClose" caption="msg:///actions.Ok"
        <action id="windowClose"
    <dialogMode height="600"
    <layout spacing="true" expand="editActions">
        <form id="demoForm" dataContainer="orderDc">
            <column width="350px">
                <timeField id="deliveryTimeField" property="deliveryTime"/>
                <textField id="ratingField" property="rating"/>
                <dateField id="dateField" property="date"/>
                <textField id="amountField" property="amount"/>
        <hbox id="editActions" spacing="true">
            <button id="commitAndCloseBtn" action="windowCommitAndClose"/>
            <button id="closeBtn" action="windowClose"/>

The window element is a root element that has the following attributes:

  • messagesGroup - an arbitrary message group associated with this window. If the messagesGroup attribute is not defined messages are loaded from the package, associated with this screen class.

  • caption - a window caption that can contain a link to a message from the messages group mentioned above.

  • description - additional information about the window that can contain a link to a message from the messages group mentioned above.

  • icon - a window icon.

  • extend is used for extending UI.

  • focusComponent - an identifier of a component that should get input focus when the screen is displayed.

Elements of the descriptor:

  • data - defines data components of the screen.

  • facets - defines the list of facets for the screen.

  • actions - defines the list of actions for the screen.

  • dialogMode - defines settings of geometry and behavior of the screen when it is opened as a dialog.

    Attributes of the dialogMode element:

    • closeable - defines whether the dialog window has a close button. Possible values: true, false.

    • closeOnClickOutside - defines if the dialog window should be closed by clicking outside the window area when the window has a modal mode. Possible values: true, false.

    • forceDialog - specifies that the screen should always be opened as a dialog. Possible values: true, false.

    • height - sets the height of the dialog window.

    • modal - specifies the modal mode for the dialog window. Possible values: true, false.

    • positionX - sets the x position of the top-left corner of the dialog window.

    • positionY - sets the y position of the top-left corner of the dialog window.

    • resizable - defines whether a user can change the size of the dialog window. Possible values: true, false.

    • width - sets the width of the dialog window.

      <dialogMode height="600"
  • layout - a root element of the screen layout.