diff options
author | Leif Åstrand <leif@vaadin.com> | 2013-08-30 13:43:34 +0300 |
---|---|---|
committer | Leif Åstrand <leif@vaadin.com> | 2013-08-30 13:43:34 +0300 |
commit | be3953c0686a4bd59fe9df2c401d882104a7afac (patch) | |
tree | dcefc03352e742a41d3551d781651bfbe19875d6 /server | |
parent | d827a1760da477575294f0105933e868c1bf3ad3 (diff) | |
parent | ad669c39c603650cc8193eef83fe1b6a39be0e45 (diff) | |
download | vaadin-framework-be3953c0686a4bd59fe9df2c401d882104a7afac.tar.gz vaadin-framework-be3953c0686a4bd59fe9df2c401d882104a7afac.zip |
Merge changes from origin/7.1
4f3e81a Use <code> instead of {@code} for sample containing { and } (#12311)
c7a48ae Delay sending DateField popup value to server until popup is closed #6252
dc491a4 Reset waitingForFilteringResponse flag to false inside onBlur (#12325)
4fb775a Fixed a typo in FieldGroup.isModified() JavaDoc. (#12172)
aa47197 Add a chapter on installing IvyDE (for #12359)
eaec281 GWT requires max 1.6 compiler compliance level currently - #12345
f72be69 Terminate JVM if server.close() has no effect (#12363)
36413cb Make sure that no fileIds are replayed to the client (#12330)
7182665 Fix scrollbar for Window under WebKit browsers (#11994)
61dbe9c Search only remaining message for delimiter (#12404)
b5a212a Report min and max times from Profiler (#12409)
7220ca8 Fixed DragAndDropWrapper using wrong drop target in IE8 #12406
c87772b Escape markup in CustomLayout's JavaDoc (#12410)
f5b67af Optimize ComputedStyle.getIntProperty() (#12411)
0473036 Add more detailed profiling for some client side hotspots (#12418)
7dfe5ae Fixed test broken by fixes to drag&drop #12406
234ed1c Fixed test broken by PopupDateField communication change #6252
c7a8c3f Fixed failing TabKeyboardNavigation test #12433
fac9ff6 Optimize resetting of state when detaching components (#10899, #11284)
af995de Optimize large Vertical/HorizontalLayout client side (#12420, #10899)
39fd5fc Fix bug for spacing on first widget (#12420)
bd4442b Fixed broken test due to changes in drop position by #12406
b83240f Optimize CssLayout hierarchy update (#11284)
a52b286 Added controlDirective to ifContentStatement. Fixes ticket #12105.
8ce45c7 Disable slow sanity check when not in debug mode (#12463)
232eb42 Enable use of profiler without debug window (#12465)
6dc46c5 Use the add() path of CssLayout only when appending to the end (#11284)
bea7fa3 Only consider caption tooltips for own slots (#12469)
dce63d1 Allow creating session for Portlet UI init request (#12473)
ad669c3 Adds junit to the ide configuration for the theme-compiler module.
Change-Id: Icd734d6849cc4f4014e1268f4fabe1ed92f72e38
Diffstat (limited to 'server')
6 files changed, 37 insertions, 13 deletions
diff --git a/server/src/com/vaadin/annotations/JavaScript.java b/server/src/com/vaadin/annotations/JavaScript.java index bdba70c095..3e9c46083d 100644 --- a/server/src/com/vaadin/annotations/JavaScript.java +++ b/server/src/com/vaadin/annotations/JavaScript.java @@ -44,10 +44,11 @@ import com.vaadin.server.ClientConnector; * 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 - * the ClassLoader that was used to load com.example.MyConnector. + * Example: <code>@JavaScript({"http://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 + * com.example.MyConnector. * * @author Vaadin Ltd * @since 7.0.0 diff --git a/server/src/com/vaadin/annotations/StyleSheet.java b/server/src/com/vaadin/annotations/StyleSheet.java index 6540633f8f..bc5b011873 100644 --- a/server/src/com/vaadin/annotations/StyleSheet.java +++ b/server/src/com/vaadin/annotations/StyleSheet.java @@ -49,8 +49,8 @@ import com.vaadin.server.ClientConnector; * VAADIN folder and vaadin:// you can publish stylesheets which use images or * other files with relative paths. * <p> - * Example: {@code @StyleSheet( "http://host.com/file1.css", "file2.css"})} on - * the class com.example.MyConnector would load the file + * 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. diff --git a/server/src/com/vaadin/data/fieldgroup/FieldGroup.java b/server/src/com/vaadin/data/fieldgroup/FieldGroup.java index 981aea387d..23f2da53ce 100644 --- a/server/src/com/vaadin/data/fieldgroup/FieldGroup.java +++ b/server/src/com/vaadin/data/fieldgroup/FieldGroup.java @@ -656,7 +656,7 @@ public class FieldGroup implements Serializable { /** * Checks if any bound field has been modified. * - * @return true if at least on field has been modified, false otherwise + * @return true if at least one field has been modified, false otherwise */ public boolean isModified() { for (Field<?> field : getFields()) { diff --git a/server/src/com/vaadin/server/VaadinPortletService.java b/server/src/com/vaadin/server/VaadinPortletService.java index c7fc5a23bd..194c9c88a9 100644 --- a/server/src/com/vaadin/server/VaadinPortletService.java +++ b/server/src/com/vaadin/server/VaadinPortletService.java @@ -201,6 +201,10 @@ public class VaadinPortletService extends VaadinService { // been rendered, e.g. portlet on one page sends an event to a // portlet on another page and then moves the user to that page. return true; + } else if (PortletUIInitHandler.isUIInitRequest(request)) { + // In some cases, the RenderRequest seems to be cached, causing the + // first request be the one triggered by vaadinBootstrap.js. + return true; } return false; } diff --git a/server/src/com/vaadin/ui/CustomLayout.java b/server/src/com/vaadin/ui/CustomLayout.java index 7bffa05058..37c9a4fa21 100644 --- a/server/src/com/vaadin/ui/CustomLayout.java +++ b/server/src/com/vaadin/ui/CustomLayout.java @@ -80,7 +80,7 @@ public class CustomLayout extends AbstractLayout implements LegacyComponent { * @param templateStream * Stream containing template data. Must be using UTF-8 encoding. * To use a String as a template use for instance new - * ByteArrayInputStream("<template>".getBytes()). + * ByteArrayInputStream("<template>".getBytes()). * @param streamLength * Length of the templateStream * @throws IOException @@ -92,7 +92,7 @@ public class CustomLayout extends AbstractLayout implements LegacyComponent { /** * Constructor for custom layout with given template name. Template file is - * fetched from "<theme>/layout/<templateName>". + * fetched from "<theme>/layout/<templateName>". */ public CustomLayout(String template) { this(); diff --git a/server/src/com/vaadin/ui/DragAndDropWrapper.java b/server/src/com/vaadin/ui/DragAndDropWrapper.java index 7a2cfb82e4..2ab3e872c6 100644 --- a/server/src/com/vaadin/ui/DragAndDropWrapper.java +++ b/server/src/com/vaadin/ui/DragAndDropWrapper.java @@ -17,10 +17,12 @@ package com.vaadin.ui; import java.io.OutputStream; import java.util.HashMap; +import java.util.HashSet; import java.util.Iterator; import java.util.LinkedHashMap; import java.util.Map; import java.util.Map.Entry; +import java.util.Set; import com.vaadin.event.Transferable; import com.vaadin.event.TransferableImpl; @@ -183,6 +185,8 @@ public class DragAndDropWrapper extends CustomComponent implements DropTarget, private final Map<String, Object> html5DataFlavors = new LinkedHashMap<String, Object>(); private DragStartMode dragStartMode = DragStartMode.NONE; + private Set<String> sentIds = new HashSet<String>(); + /** * Wraps given component in a {@link DragAndDropWrapper}. * @@ -229,10 +233,24 @@ public class DragAndDropWrapper extends CustomComponent implements DropTarget, ProxyReceiver proxyReceiver = entry.getValue(); Html5File html5File = proxyReceiver.file; if (html5File.getStreamVariable() != null) { - target.addVariable(this, "rec-" + id, new ProxyReceiver(id, - html5File)); - // these are cleaned from receivers once the upload has - // started + if (!sentIds.contains(id)) { + target.addVariable(this, "rec-" + id, + new ProxyReceiver(id, html5File)); + + /* + * if a new batch is requested to be uploaded before the + * last one is done, any remaining ids will be replayed. + * We want to avoid a new ProxyReceiver to be made since + * it'll get a new URL, so we need to keep extra track + * on what has been sent. + * + * See #12330. + */ + sentIds.add(id); + + // these are cleaned from receivers once the upload has + // started + } } else { // instructs the client side not to send the file target.addVariable(this, "rec-" + id, (String) null); @@ -317,6 +335,7 @@ public class DragAndDropWrapper extends CustomComponent implements DropTarget, } // no need tell to the client about this receiver on next paint receivers.remove(id); + sentIds.remove(id); // let the terminal GC the streamvariable and not to accept other // file uploads to this variable event.disposeStreamVariable(); |