Data/object sharing between pages

Hello,
I’m new to vaadin and try to use it for a platform independent serial connection on CNC machines.
I already made the single pages for options, loading and editing files and uploading over serial.
In my little Java GUI world it’s a standard to load objects or data in new screens with getters/setters etc.

Now I want to build a tabbar with the already build components or “pages” to show the selected “page” but I don’t know if it’s
the right way to do this like in my Java GUI worl. Cause all the examples here work with routes and I don’t find the
right method to share the selected object from tab X to the new selected tab Y over routes.

Can someone show or explain me the right tool/way to do this?

Greetings

Something like the “Tabs with pages” example here: https://vaadin.com/components/vaadin-tabs/java-examples ?

-Olli

Hi Olli, thanks for your answer!
The example looks like building a mainview and adding all the child views to it so I have to link the objects over the mainview? - the way I always did with other GUIs.
But how can I link the data between the pages by using routes?
Or is it the better solution to handle it like on the explained tab example page?
Greetings

Hi,

these are architectural questions - the answers depend on the size of your pages and other factors. You also need to consider if you want to be able to route to other tab “sheets” or not. I suggest you do it one way first and then refactor if it doesn’t seem like a good approach.

-Olli

Thanks again Olli ;),
there won’t be any personal user stuff and I guess a max of 5 pages on the whole project. The GUI itself is really compact it’s more about the interfaces and protocolls running in the background shoveling the data from the network to the machine.
I’ll take your advice with the traditional GUI way.
Have a great weekend!