jsComponent in Dialog

Is it possible to add a jsComponent to a Dialog? And if not, if the opportunity to create your own dialog box?


Dialogs does not provide ability to add custom layout. But you create the screen that can be opened as dialog. You can configure dialog parameters using @DialogMode annotation:

@DialogMode(width = "640px", height = "480px", resizable = true)
public class DemoScreen extends Screen {

Or in the XML:

<window xmlns="http://jmix.io/schema/ui/window"
    <dialogMode width="640px" height="480px" resizable="true"/>
    <layout spacing="true">

Open the screen:

private ScreenBuilders screenBuilders;

public void onOpenBtnClick(Button.ClickEvent event) {

The documnetation about DialogMode: Screen Controller Annotations.

1 Like