Hi, how to create input dialog or modal with content in cuba?

I know how to create input dialog and this works good. But i need to insert some information regaring dialog before inputs. Information will consist of user details and so on. How to achieve this?

Hello, Igor!

You can add components to the InputDialog like this:

private Dialogs dialogs;
private UiComponents uiComponents;

public void onInit(InitEvent event) {
    InputDialog inputDialog = dialogs.createInputDialog(this)

    Label<String> label = uiComponents.create(Label.NAME);
    label.setValue("Label before inputs");
    inputDialog.getDialogWindow().add(label, 0);


If you need more sophisticated UI and logic it will be better to create your own screen and open it as dialog.

1 Like