Vaadin 7 works by default, so every time a new instance of the user interface is created when a new browser tab is opened (or the tab is updated). You must store the current user information in VaadinSessionor standard HttpSessionand check UI.init()if the session contains user information.
To store information in VaadinSession, we can say:
VaadinSession.getCurrent().setAttribute("currentUser", currentUser)
In Vaadin, you can access HttpSession as follows:
VaadinSession.getCurrent().getSession()
Please note that they VaadinSessionare stored in HttpSession, and HttpSessionmay contain several VaadinSession, if several Vaadin servlets are deployed from the same war file, and the user uses them at the same time.
source
share