How to inject a dynamic HTML page?


Is there a way to inject an generated HTML page into a Vaadin page?

The goal is to:

  • display an HTML page generated by Velocity exactly as it’d be rendered by a browser (with styles & javascript code);
  • execute some JavaScript on the HTML page (or not - w/e works) when a Vaadin button is pressed;
  • get called back by the JavaScript with the data about what check-boxes were checked by a user on the HTML page.

Tried CustomLayout, but it does not honor the style.
On the last two items I saw the book chapters on JavaScript interaction, but if you have any comment off top of your head I’d appreciate them.


this code can help you.
HTML is a directory inside VAADIN/themes/mytheme/HTML

import com.vaadin.ui.BrowserFrame;
       addComponent(new VerticalLayout() {
        		BrowserFrame browser = new BrowserFrame("",
        			    new ThemeResource("HTML/mypagehtml"));

Thank you. For anyone who’s interested
the javadoc link
the book page