diff options
author | Artur Signell <artur@vaadin.com> | 2013-08-19 12:37:52 +0300 |
---|---|---|
committer | Artur Signell <artur@vaadin.com> | 2013-08-19 12:37:52 +0300 |
commit | acc12f857d04d9b341dec700ffa469ca96d30ad8 (patch) | |
tree | 43e4583b45f1ef96d9fc2919746c56f8dfff7317 /server/src/com/vaadin/annotations | |
parent | 1420d23cef01bbc4e07dba693fe4717b531cd951 (diff) | |
parent | 99c7d0b3cde116bf31b00bd31f62f9f4920b1762 (diff) | |
download | vaadin-framework-acc12f857d04d9b341dec700ffa469ca96d30ad8.tar.gz vaadin-framework-acc12f857d04d9b341dec700ffa469ca96d30ad8.zip |
Merge changes from origin/7.1
7cb49d1 Fix invisible calendar actions menu #12181
44aacf4 Clarify Embedded javadoc (#12290)
59a043b Fix actions in action menu appearing in random order #12250
5d57129 Fix calendar click events on context menu #12297
f5e3663 Document multiple load semantics in @StyleSheet and @JavaScript (#12200)
17bb700 Add optional OSGi Import-Package for javax.validation (#12301)
ea148c8 Disable all logging if production mode is enabled (#12299)
326bbb5 Fixes parsing of multiple push messages in streaming mode (#12197)
7fc1054 Ensure StringToIntegerConverter rejects values outside range of int (#12230)
f587298 Improve URI fragment listener javadocs (#12296)
d97cfbc Refine handling of null and empty URI fragments (#12207)
99c7d0b Show tooltips for ordered layout captions (#10046)
Change-Id: Ifb2e0131fde769e2620b7ba03755a5ba324d8aaf
Diffstat (limited to 'server/src/com/vaadin/annotations')
-rw-r--r-- | server/src/com/vaadin/annotations/JavaScript.java | 14 | ||||
-rw-r--r-- | server/src/com/vaadin/annotations/StyleSheet.java | 14 |
2 files changed, 26 insertions, 2 deletions
diff --git a/server/src/com/vaadin/annotations/JavaScript.java b/server/src/com/vaadin/annotations/JavaScript.java index f2085556c7..bdba70c095 100644 --- a/server/src/com/vaadin/annotations/JavaScript.java +++ b/server/src/com/vaadin/annotations/JavaScript.java @@ -29,9 +29,21 @@ import com.vaadin.server.ClientConnector; * 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/PUBLISHED/[url] which are by default served + * Relative URLs are mapped to APP/PUBLISHED/[url] which are by default served * from the classpath relative to the class where the annotation is defined. * <p> + * The file is only loaded if it has not already been loaded, determined as + * follows: + * <ul> + * <li>For absolute URLs, the URL is considered loaded if the same URL has + * previously been loaded using {@code @JavaScript} or if a script tag loaded + * from the same URL was present in the DOM when the Vaadin client-side was + * initialized. + * <li>For relative URLs, the URL is considered loaded if another file with the + * same name has already been loaded using {@code @JavaScript}, even if that + * file was loaded from a different folder. + * </ul> + * <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 diff --git a/server/src/com/vaadin/annotations/StyleSheet.java b/server/src/com/vaadin/annotations/StyleSheet.java index 2e15d9481c..6540633f8f 100644 --- a/server/src/com/vaadin/annotations/StyleSheet.java +++ b/server/src/com/vaadin/annotations/StyleSheet.java @@ -29,9 +29,21 @@ import com.vaadin.server.ClientConnector; * 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/PUBLISHED/[url] which are by default served + * Relative URLs are mapped to APP/PUBLISHED/[url] which are by default served * from the classpath relative to the class where the annotation is defined. * <p> + * The file is only loaded if it has not already been loaded, determined as + * follows: + * <ul> + * <li>For absolute URLs, the URL is considered loaded if the same URL has + * previously been loaded using {@code StyleSheet} or if a + * {@code <link rel="stylesheet">} tag using the same URL was present in the DOM + * when the Vaadin client-side was initialized. + * <li>For relative URLs, the URL is considered loaded if another file with the + * same name has already been loaded using {@code StyleSheet}, even if that file + * was loaded from a different folder. + * </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 |