Based on Googling, I found that Vaadin 8 had a nice "iFrame" support using a class called BrowserFrame " (eg https://vaadin.com/docs/v7/framework/components/components-embedded.html) or just see below:
BrowserFrame browser = new BrowserFrame("Browser",
new ExternalResource("http://demo.vaadin.com/sampler/"));
browser.setWidth("600px");
browser.setHeight("400px");
layout.addComponent(browser);
However, this does not exist in Vaadin 12. Is there a recommended way to create an iFrame component in Vaadin 12? Thus far, I hacked it by creating a vaadin12 html compnent, which allows me to put any old html in it, as follows:
MainApp.iFrameHelp = new Html("<iframe src=\"https://docs.readthedocs.io/en/latest/intro/getting-started-with-sphinx.html/intro/getting-started-with-sphinx.html\"></iframe>");
. But, if that's the "only/right" way to do this in Vaadin 12, then how can I get this html component to be "updated" with a new page. (I noticed that once an html component is created, there is no "setValue" method to reset the html to a new value. Moreover, even if you do something like "myHtmlComponent = new Html(...)", it does NOT seem to refresh the final UI....(At least, not in my code.) Thoughts?
An IFrame
component is introduced in Vaadin 13: https://github.com/vaadin/flow/pull/4898. Vaadin 13 is currently in beta and will be final in the beginning of March.
There shouldn't be anything in that component that doesn't also work together with Vaadin 12, so you can most likely just copy the implementation from https://github.com/vaadin/flow/blob/master/flow-html-components/src/main/java/com/vaadin/flow/component/html/IFrame.java into your own Vaadin 12 project and use it as-is.