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:
@Inject
private Dialogs dialogs;
@Inject
private UiComponents uiComponents;
@Subscribe
public void onInit(InitEvent event) {
InputDialog inputDialog = dialogs.createInputDialog(this)
.withParameter(stringParameter("name").withCaption("Name"))
.build();
Label<String> label = uiComponents.create(Label.NAME);
label.setValue("Label before inputs");
inputDialog.getDialogWindow().add(label, 0);
inputDialog.show();
}
If you need more sophisticated UI and logic it will be better to create your own screen and open it as dialog.
1 Like