Looking for conceptual explanation about view parameters etc.

Hi there, Working on a Vaadin 8 project (a rewrite for an existsing V7 application, which we cannot migrate) , I’d like to have a good understanding of the purpose of view parameters. Are parameters the only way to pass values to a view entity? Can I pass e.g. an object to a view? Are there other ways I could communicate with a certain view? What is the recomended way to get data out of a view (e.g. data that is not persisted yet, but required in the view from which we navigated (the parent view)? I guess it’s documented somewhere, and a pointer to the right place in the docs would be great.

Thank in advance,

There is no standard way to pass data to Views in Vaadin, what you can do is the following
1- Extend View with a new class (MyView) that has the method #acceptData(Object obj)
2- Extend the Navigator (MyNavigagtor) and introduce a new method that will take the (String viewName, Object data)
3- in the new method, take the data and store it in a instance variable inside MyNavigagtor, then call super.navigateTo(viewName)
4- Create Navigation Listener and add it MyNavigation.
5- In the listener onBeforeNavigation, get the new View from the event(which will be an Object of type MyView) and get the data from the instance variable that you have used in point 3 and pass it to your view.
6- After sending the data to the new view, make sure to remove it from the instance variable (in a finally block)

That said, you need to take into account some issues like bookmarking and back-forward browser buttons. also this could introduce some side effects if the View is Singleton