Referencing Resources -Vaadin Applications
Referencing Resources is very important for web applications.Most of the internet applications need to load images,files from external resources,within the class or from the theme.
Vaadin provides ways for retrieving URI and other parameters.There are two interfaces for Vaadin getting resources.
Resource Interface and Class Diagram
Different Ways of Referencing Resources
There are different ways of Referencing Resources depending on the type of the resource and location.
Files can be located anywhere in a file system.These resources can be in two forms-:downloadable files and embedded images.These file resources can be accessed by using standard java.io.File
2.Class Loader Resources
ClassResources can be loaded a deployed package of the application using Java Class Loader.For Example
Vaadin Applications have themes that are located in VAADIN/themes/themename folder.Theme resources can be easily be referenced as shown in example below.