I have a Vaadin 14 application with multiple views (but no UI). I need store an object per user that is accessible in all the user's views. What is best way to implement this?
You can use VaadinSession.getCurrent().setAttribute(key, value);
to store an object in the current VaadinSession
. You can use either a String
or a Class<T>
key. The object will be available through VaadinSession.getCurrent().getAttribute(key)
and it will be accessible from all browser tabs that are connected to the same session.