Thursday, March 24, 2011

Cross-Site Embedding Vaadin Applications

I've been recently testing the embedding of Vaadin applications.
Here's the Vaadin Sampler embedded:




Well, the application isn't made for this narrow columns, but it works, and runs on a completely different server. And isn't in an iframe.

Essentially, all you need to embed an app is:
    <script src="http://demo.vaadin.com/xsembed/getEmbedJs" type="text/javascript"></script>
However, if the app has 100% vertical size, you must put it in an element with a defined height. You may also want to set the width in some cases, such as in the example above:
<div style="height: 600px; width: 400px; overflow: auto;">
<div style="height: 500px; width: 800px;">
<script src="http://demo.vaadin.com/xsembed/getEmbedJs" type="text/javascript"></script>
</div>
</div>

No comments: