ConfirmDialog problem with authentication window

Authenticating Vaadin based Applications
My application uses authentication mechanism using a LoginWindow described in

With that if I use confirmDialog, after successful login and application loading data in a table, as such, "Delete Entry:", "Are you sure?", "Yes", "No",
							new ConfirmDialog.Listener() {

								public void onClose(ConfirmDialog dialog) {
									if (dialog.isConfirmed()) {

upon closing the dialog, it takes me back to the login window instead of the application window

My logical coding flow is -

  1. Launch login window
  2. On successful authentication,


[/indent]create a new window w




[/indent]build application layout


[/indent]set layout to window w


[/indent]load data

  1. From the loaded table data, context menu “Delete Entry” invokes the confirmDialog as shown above

  2. When confirming yes, the table removes the item, popup closes but the main page goes back to login window instead of application window and I am forced to restart my application

Any help is appreciated



I noticed you are calling the close() method in the onClose method. That is probably what you did not want to do, because it closes
the whole application
causing it to reset (and go back to the login view I guess).

(And the ConfirmDialog you don’t need to close at all. It is closed automatically.)

Thank you Sami!

That was it - a victim of copy-paste error.