Vaadin with Generic Views

I’m learning Vaadin and I have questions about creating a generic view. I want to do something like EditView where I can instantiate a view based on type. To do that I need to have a non-static Route for it (so annotations won’t work) and the ability to create it (ideally as a Spring Bean) or possibly some other ways to do this. For instance I could make the view simply be a JavaBean editing view, if the view can access the bean that is bound to it. Or even just obtain the bean’s class would be good enough maybe. I don’t see a way to do any of these things in the documentation. Please let me know if there is a way to do this.

You could use a route with parameters (the name of the type or something similar)

or generate the routes dynamically: Registering Routes Dynamically | Routing & Navigation | Vaadin Docs

Thanks! I can’t believe I missed the "Adding routes dynamically":weary: