diff options
Diffstat (limited to 'src/com/vaadin/annotations/JavaScript.java')
-rw-r--r-- | src/com/vaadin/annotations/JavaScript.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/com/vaadin/annotations/JavaScript.java b/src/com/vaadin/annotations/JavaScript.java index 065c37b78d..f97457c1cd 100644 --- a/src/com/vaadin/annotations/JavaScript.java +++ b/src/com/vaadin/annotations/JavaScript.java @@ -15,6 +15,16 @@ import com.vaadin.terminal.gwt.server.ClientConnector; * If this annotation is present on a {@link ClientConnector} class, the * framework ensures the referenced JavaScript files are loaded before the init * method for the corresponding client-side connector is invoked. + * <p> + * Absolute URLs including protocol and host are used as is on the client-side. + * Relative urls are mapped to APP/CONNECTOR/[url] which are by default served + * from the classpath relative to the class where the annotation is defined. + * <p> + * Example: {@code @JavaScript( "http://host.com/file1.js", "file2.js"})} on + * the class com.example.MyConnector would load the file + * http://host.com/file1.js as is and file2.js from /com/example/file2.js on the + * server's classpath using the ClassLoader that was used to load + * com.example.MyConnector. * * @author Vaadin Ltd * @version @VERSION@ |