Images, Flash, video, audio, and other web content
In the previous section, we saw how to add an icon to a component through a ClassResource
instance. A Resource
represents web content such as images, flash files, audio files, video, or even an external web page.
Note
Vaadin has two flavors of resources: Generic resources (implement Resource
) and connector resources (implement ConnectorResource
). A connector resource is specialized in the sense that it will connect to a resource through the Vaadin Servlet
while a generic resource will bypass the Servlet
.
We can choose from five Resource
implementations:
Class |
Description |
Example |
---|---|---|
|
Fetches a resource from a location specified by URL. The resource is fetched directly by the client. |
ExternalResource( "http://alejandrodu.com") |
|
Vaadin applications can use a theme. A theme is a collection of web resources such as HTML templates, and CSS files. This implementation fetches the resource from the directory where the... |