Vaadin XS Addon - Vaadin within Vaadin..

Hi Guys,

Is there any reason that the XS addon won’t allow me to embed a Vaadin application within a Vaadin application?

I ask because I’m designing a system which will be hosted on an number of Intranets with certain functionality only available from one or more remote application servers.

I want to use Vaadin and hopefully the XS addon so the finished application though distributed looks and feels singular…

Is it possible to embed more that one remote Vaadin application from different domains?

any comments very welcome,

kind regards

Patrick

This is something that is not tested. In theory it should work. Some potential issues:

  • Applications should share one common theme
  • XS inside a Vaadin application might create themeing issues
  • I would not be surprised to bump into rough edges as this is untested territory

If you try it out, please report your experiences back.

Thank you Joonas,

I will report back when I get to that part of the project, 

hopefully it will work seamlessly :grin:

thanks for your input

regards,

Patrick

Hi,

Although Joonas suggested otherwise, I’d say this setup should not work in theory. I’d be happy and surprised if it would. The tricky part here is Vaadin
within
Vaadin. Although multiple GWT modules (aka vaadin widgetsets) are nowadays possible on the same host page, GWT (and Vaadin) bootstrap process depends on the host pages onload event, making it impossible to inject new application on the fly. In other words multiple Vaadin applications on the same host page is not a problem, but starting a new one into an existing one is.

We could modify the Vaadin bootstrap so that there would be a JS api to re-initiate the kickstart phase, but all (potential) widgetsets would still need to be on host page when it is loaded.

As a workaround I’d suggest to take the infamous iframe path. Just open your sub applications into an Embedded component (setType(TYPE_BROWSER)) within the “main application”. The result for your customer will be pretty much the same. You could use XS as a helper in case you face some third party cookie issues.

cheers,
matti