I have the following two classes.
the first one extends ConfirmDialog
public void showDialogFromList(ArrayList<EntityMessage> listMessage)
{
.........
this.setText(new Html("<div>"+message+"</div>").getElement())
Image imgOk = new Image(ICO_OK16,"ok");
Button buttonYes = new Button("συνέχεια");
buttonYes.setIcon(imgOk);
this.setConfirmButton(buttonYes);
this.addConfirmListener(event -> {
this.close();
});
Image imgCancel = new Image(ICO_CANCEL16,"cancel");
Button buttonNo = new Button("άκυρο");
buttonNo.setIcon(imgCancel);
this.setCancelButton(buttonNo);
this.open();
}
and is called by this part
UtilsGui utilsGui = new UtilsGui();
utilsGui.showDialogFromList(listMessages);
utilsGui.addCancelListener( e->{
System.out.println(" ------A checkForListMessages utilsGui.showMessageFromList return intListMessages:"+utilsGui.getDialogResult());
utilsGui.close();
});
Unfortunately I cannot get the message from System.out.println appear when the utilsGui.addCancelListener should run. I am using version 20.0.6 Thank you in advance.