I have created an UIComponent to embed Vaadin applications into XPages. It allows to run both technologies on the same site by adding it to your XPage:
This little example shows the XPage above including the the Adressbook application:
The Vaadin application is reachable at „http://localhost/vaadin/“ (hosted by Domino), that’s why the property url is set to „/vaadin/„. The property divId contains the name of the application which is used as id in the DOM tree.
It is required that the VaadinComponent is not inside a xp:form element. If it detects a surrounding form, a runtime exception is thrown. That’s why you have to set createForm to false and add your own xp:form to your application, as shown in the example.
If the parameter forceResize is set to true, a CSS style sheet is added to the XPage which resizes the height of html and the body node to 100%. Otherwise the Vaadin application will not be displayed correctly.
Resource Aggregation must be disabled, otherwise it won’t work.
The sources can be found at https://github.com/hasselbach/VaadinInXPages
Great blog post, this is very useful. Forgive the uneducated question, but because it’s running in the XPages runtime, does that mean the Vaadin application classes will have immediate direct access to the Domino classes, without needing to start a Domino thread?
If it is running in the XPages runtime, you can access the Domino classes. But you can include every Vaadin app you want – it is not required to run it on the domino stack; you can host the Vaadin app where you want (just need to add CORS headers in your Vaadin app).