Vaadin In XPages: A UIComponent for embedding Vaadin applications

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:

<?xml version="1.0" encoding="UTF-8"?>

    <!-- XPages Application -->
        <xp:div id="refreshMe">
    <!--  VAADIN Application -->
        url = "/vaadin/"
        forceResize="true" />

This little example shows the XPage above including the the Adressbook application:

2016-05-03 12_31_17-VaadinInXPages

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.

2016-05-03 12_50_11-Runtime Error

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.

2016-05-03 12_54_35-view-source_localhost_VaadinInXPages.nsf_index.xsp

Resource Aggregation must be disabled, otherwise it won’t work.

The sources can be found at

Dieser Beitrag wurde unter Vaadin, XPages abgelegt und mit , verschlagwortet. Setze ein Lesezeichen auf den Permalink.

2 Antworten zu Vaadin In XPages: A UIComponent for embedding Vaadin applications

  1. 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).

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.