XML Descriptors

Screen descriptor is an XML file containing declarative definition of visual components, data components and some screen parameters. 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:

  • class − a name of the controller.

  • caption − a window caption that can contain a link to a message from the pack mentioned above.

  • 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.

  • 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 click 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"
  • actions – defines the list of actions for the screen.

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

  • layout − root element of the screen layout.