Sharing state between seperate vaadin apps on different pages - how?

Hold on ---- I know vaadin is not a page oriented framework/solution, so that’s not what this question is about.

In earlier posts I mentioned that I’m looking for alternatives (for Adobe Flex/Flash) to embed user interactivity in an overall static/page-by-page oriented rendering framework. Now suppose I have a content page on which vaadin application A is embedded, how can I make vaadin application B - which is embedded in a completely different page - use (shared) data created by application A and vice versa? I reckon vaadin abstracts the fact that underneath it sits on top of the servlet API and doesn’t recommended getting at HttpSession state from within application components. Can somebody point me in the right direction?


For a quick answer, if sharing data between Session is OK (both applications are within the same Java process / server) see WebApplicationContext API, here’s the code:

Cheers! Jani

Hi Jan,

In addition to what Jani said, depending on the types of application A and B and what data they process, you could make them into two windows in one application. Registering a new window to the Application instance means that you can access it like this: http://localhost:8080/MyApplication/WindowName

And then there’s always the option of storing the data somewhere, but that probably isn’t a good option in this case.