The user has a browser tab open which shows one View of a UI instance. On that View, there’s a “Logout” button. When the user clicks on it, I invalidate the session and redirect to the login View:
getUI().getSession().getSession().invalidate();
getUI().getPage().setLocation("/reporting/");
This works well. But suppose the user has another UI/View open in a second tab. The next time he tries to interact with that View, he gets an error (since the session is invalid). Instead of showing an error, I’d like to have him directed to the login page. Does anyone know how to best accomplish that?
Any help is much appreciated.