]> source.dussan.org Git - vaadin-framework.git/commitdiff
Documents the possibility to use vaadin:// and theme:// in JavaScript… (#11512)
authorMartin Vysny <martin@vysny.me>
Thu, 28 Mar 2019 14:23:24 +0000 (16:23 +0200)
committerAnastasia Smirnova <anasmi@utu.fi>
Thu, 28 Mar 2019 14:23:24 +0000 (16:23 +0200)
Documents the possibility to use vaadin:// and theme:// in JavaScript and StyleSheet annotations.

Fixes #8675

server/src/main/java/com/vaadin/annotations/JavaScript.java
server/src/main/java/com/vaadin/annotations/StyleSheet.java

index 0e49904fee2e9435e4704cdf67377f36d1de50ec..d7b312b40fc656cd94df8dd16330b4e6163f44f5 100644 (file)
@@ -46,10 +46,17 @@ import com.vaadin.server.ClientConnector;
  * file was loaded from a different folder.
  * </ul>
  * <p>
- * Example: <code>@JavaScript({"http://host.com/file1.js", "file2.js"})</code>
+ * Special Vaadin urls are also supported. The most useful is vaadin:// which
+ * maps to the location of the automatically published VAADIN folder located on
+ * your classpath in your resources. Using the VAADIN folder and vaadin:// you
+ * can publish JavaScript files which use images or other files with relative
+ * paths. Another example is the theme:// url which maps to the location of your
+ * current theme.
+ * <p>
+ * Example: <code>@JavaScript({"https://host.com/file1.js", "file2.js"})</code>
  * 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
+ * https://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.
  * <p>
  * For adding multiple JavaScript files for a single component, you can use this
index 528b6458b5c0e4ed4d9eae7e49c6265efc507aad..03783187b2bbc3a70b9a2f05119513fccd7e558f 100644 (file)
@@ -47,15 +47,17 @@ import com.vaadin.server.ClientConnector;
  * </ul>
  * <p>
  * Special Vaadin urls are also supported. The most useful is vaadin:// which
- * maps to the location of the automatically published VAADIN folder. Using the
- * VAADIN folder and vaadin:// you can publish stylesheets which use images or
- * other files with relative paths.
+ * maps to the location of the automatically published VAADIN folder located on
+ * your classpath in your resources. Using the VAADIN folder and vaadin:// you
+ * can publish stylesheets which use images or other files with relative paths.
+ * Another example is the theme:// url which maps to the location of your
+ * current theme.
  * <p>
- * Example: <code>@StyleSheet({"http://host.com/file1.css", "file2.css"})</code>
- * 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.
+ * Example:
+ * <code>@StyleSheet({"https://host.com/file1.css", "file2.css"})</code> on the
+ * class com.example.MyConnector would load the file https://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.
  * <p>
  * For adding multiple style sheets for a single component, you can use this
  * annotation multiple times.