In my application I use the ViewChangeListener to decide whether the user is allowed to see the next view or not.
Within the method beforeViewChange I want to open a Popup with:
Window loginWindow = new Window();
loginWindow.setModal(true);
UI.getCurrent().addWindow(loginWindow);
The Window will ask for user and password. If the user entered valid datas, then the beforeViewChange should return true otherwise false.
Unfortunately the beforeViewChange is not waiting for the user input. In fact it opens the loginWindow and continous immediately.
Does anybody know how I can wait for the user input within the beforeViewChange method or exists another way to solve this problem?
Many thanks in advance for your response.
chris
ps. I’m using Vaadin 7