I have Vaadin 8 confirmation code there it performs a long lasting task. I would like to dismiss the dialog and show a progress bar:-
ConfirmDialog.show(UI.getCurrent(), "Dynamic Report warning caption",
"More than " +rows+ " rows in this table. It will take long time to generate this report.\nDo you still want to continue? ",
SalkkuTM.getI18N("PortfolioManagementMenuBar.deleteData.confirmDialog.yes.caption"),
SalkkuTM.getI18N("PortfolioManagementMenuBar.deleteData.confirmDialog.no.caption"), new ConfirmDialog.Listener() {
public void onClose(ConfirmDialog dialog) {
ProgressBar bar = new ProgressBar();
bar.setIndeterminate(true);
if (dialog.isConfirmed()) {
layout.addComponent(bar);
// this method does a long lasting task.
dynamicReportParameterGenerator();
bar.setVisible(false);
}
}
});
I would like to dismiss this dialog as soon as user select yes. And I would like to show an Indeterminate progress bar. I couldn't manage it. How to do it? Please let me know how can I do it?