MessageDialogFacet gives you an alternative way to configure and open a message dialog. Instead of using the Dialogs.createMessageDialog() method in the screen controller, you can configure MessageDialogFacet in the XML descriptor with the help of Studio visual designer.

Component’s XML-name: messageDialog.


In the example below, the message dialog will be opened when the user clicks messageDialogBtn button:

    <messageDialog id="messageDialogFacet"
                   caption="Message Dialog"
    <button id="messageDialogBtn"
            caption="Show MessageDialog"/>

MessageDialogFacet is defined in the facets element of the screen XML descriptor and has the following attributes:

You can bind MessageDialogFacet to a button or an action to open the dialog on the button click or execution of the action.

  • onAction - defines id of an action which should trigger the dialog opening.

  • onButton - defines id of a button which should trigger the dialog opening.

Also, you can use the method to show the dialog:

private MessageDialogFacet msgDialog;

public void onMessageDialogBtnClick(Button.ClickEvent event) {;

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.