I use Vaadin in an OSGi environment, without an app server (directly with HttpService). My UI gets initialized and handles requests correctly.
I would like the UI to have access to data from the rest of the application, but I don’t know how the UI should get that reference.
I could use a static MyApp.getData(), but that’s very ugly in my opinion.
I believe, I should inject the relevant data in the VaadinRequest which is passed to init(). But how to do that?
The only class I instantiate extends VaadinServlet and specifies the UI with the @VaadinServletConfiguration annotation (it is registered directly with the HttpService). So I never get to see the requests and so cannot add a data refernce to the VaadinRequest in init().
How should I inject data in my UI?
Thanks Philipp