I have a doubt regarding the purpose of @PreserveOnRefresh annotation. What is the purpose of this particular annotation and what are the scenarios in which it has to be use
When the enduser does press F5 (or click Refresh) in the web browser, then the behaviours is:
With @PreserveOnRefresh -> Use the same session, just refresh the UI from the server state
Without @PreserveOnRefresh -> Vaadin is creating a new session for the user and the user is shown the "first" page of your application
So usually the @PreserveOnRefresh is the intended behaviour, otherwise the user is logged out when he clicks on refresh