Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Creating a Iframe that loads URL based on address on TextBox
I just tried Vaadin today, and I am trying to figure out how to create a Iframe that loads URL. In my GWT application I just used the GWT frame component, however I am not sure how to implement this with Vaadin, and if it will work the same? Also, since the component is server side, does it mean that the iframe in a Vaadin application is not bound by browser SOP (policy)?
To load a remote URL in an iframe can be accomplished by using the Embedded component with and ExternalResource. There is in fact an example in the Vaadin sampler that does this. Basically, what you need to do, is to create an ExternalResource object with the URL from a TextField. After that you create an Embedded component and define it's type as browser (this will tell the component to render itself as an iframe).
Embedded e = new Embedded("Vaadin web site", new ExternalResource( "http://vaadin.com")); e.setType(Embedded.TYPE_BROWSER); e.setWidth("100%"); e.setHeight("400px"); addComponent(e);