Launch dialogs.createInputDialog


I have a Datagrid and a button.When I click the button I scroll the table and for each row I launch a Dialogs.createInputDialog() but this opens at the end of the cycle.
I would like the Dialogs to open every time I finish reading the line.

public void onFileClick(Button.ClickEvent event) {
table.getItems().getItems().forEach(e-> {


        if (nReg!=null) {
                    .withCaption(" ")
                            InputParameter.parameter("Update").withField(() -> {

                                RadioButtonGroup radioButton = uiComponents.create(RadioButtonGroup.NAME);

                                Map<String, String> mappaSetRadio = new LinkedHashMap<>();

                                mappaSetRadio.put("YES", "1");
                                mappaSetRadio.put("NO", "2");

                                return radioButton;


                    .withCloseListener(closeEvent -> {
                        if (closeEvent.getCloseAction().equals(InputDialog.INPUT_DIALOG_OK_ACTION)) {

                            String risult = closeEvent.getValue("Update");

                            try {
                                if (risult.equals("1")) {


                                } else if (risult.equals("2")) {


                            } catch (Exception ex) {


        }else {




What’s the problem?
Can you help me?


it is because the thread opens the screen and continues the execution.

I would suggest collecting items and create a specific screen where the user can perform some actions instead of opening InputDialog for each item.