summaryrefslogtreecommitdiffstats
path: root/src/com/vaadin/annotations
diff options
context:
space:
mode:
authorLeif Åstrand <leif@vaadin.com>2012-06-28 18:47:01 +0300
committerLeif Åstrand <leif@vaadin.com>2012-06-28 18:47:26 +0300
commit060ba3b63cf1c46bb726a6f6f0910924fb185364 (patch)
treeef5e60441a87272a5ad93dac7dd4fe784b4bca39 /src/com/vaadin/annotations
parent2d9849ebfe70fff9bcb832e373baada14b0d387d (diff)
downloadvaadin-framework-060ba3b63cf1c46bb726a6f6f0910924fb185364.tar.gz
vaadin-framework-060ba3b63cf1c46bb726a6f6f0910924fb185364.zip
Describe how paths are resolved in javadoc (#9048)
Diffstat (limited to 'src/com/vaadin/annotations')
-rw-r--r--src/com/vaadin/annotations/JavaScript.java10
-rw-r--r--src/com/vaadin/annotations/StyleSheet.java6
2 files changed, 16 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@
diff --git a/src/com/vaadin/annotations/StyleSheet.java b/src/com/vaadin/annotations/StyleSheet.java
index f8bf635474..d082cb8d30 100644
--- a/src/com/vaadin/annotations/StyleSheet.java
+++ b/src/com/vaadin/annotations/StyleSheet.java
@@ -15,6 +15,12 @@ import com.vaadin.terminal.gwt.server.ClientConnector;
* If this annotation is present on a {@link ClientConnector} class, the
* framework ensures the referenced style sheets are loaded before the init
* method for the corresponding client-side connector is invoked.
+ * <p>
+ * Example: {@code @StyleSheet( "http://host.com/file1.css", "file2.css"})} on
+ * the class com.example.MyConnector would load the file
+ * http://host.com/file1.css as is and file2.css from /com/example/file2.css on
+ * the server's classpath using the ClassLoader that was used to load
+ * com.example.MyConnector.
*
* @author Vaadin Ltd
* @version @VERSION@