diff options
author | Ilia Motornyi <elmot@vaadin.com> | 2017-03-09 09:29:20 +0200 |
---|---|---|
committer | Henri Sara <henri.sara@gmail.com> | 2017-03-09 09:29:20 +0200 |
commit | 264ee7696568827815604f1e22ce7e330775b3ce (patch) | |
tree | 70bda37d99e4cc0b328c6e65ef70ec2e0504debf /compatibility-client | |
parent | 82ea08974b1c5510da0b2c59d0c9e3edb768f6bb (diff) | |
download | vaadin-framework-264ee7696568827815604f1e22ce7e330775b3ce.tar.gz vaadin-framework-264ee7696568827815604f1e22ce7e330775b3ce.zip |
Fix Upload and push in TabSheet (#8782)
Also fixes JSNI calls in compatibility Upload component.
Fixes #8728 for the compatibility package
Diffstat (limited to 'compatibility-client')
3 files changed, 8 insertions, 6 deletions
diff --git a/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VUpload.java b/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VUpload.java index 8f892e377e..4969f19933 100644 --- a/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VUpload.java +++ b/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VUpload.java @@ -249,10 +249,12 @@ public class VUpload extends SimplePanel { t.cancel(); } VConsole.log("VUpload:Submit complete"); - ((UploadConnector) ConnectorMap.get(client) - .getConnector(VUpload.this)) - .getRpcProxy(UploadServerRpc.class) - .poll(); + if (isAttached()) { + // no need to call poll() if component is already + // detached #8728 + ((UploadConnector) ConnectorMap.get(client).getConnector(VUpload.this)) + .getRpcProxy(UploadServerRpc.class).poll(); + } } rebuildPanel(); diff --git a/compatibility-client/src/main/java/com/vaadin/v7/client/ui/upload/UploadIFrameOnloadStrategy.java b/compatibility-client/src/main/java/com/vaadin/v7/client/ui/upload/UploadIFrameOnloadStrategy.java index c01fce1b50..d842fc8e01 100644 --- a/compatibility-client/src/main/java/com/vaadin/v7/client/ui/upload/UploadIFrameOnloadStrategy.java +++ b/compatibility-client/src/main/java/com/vaadin/v7/client/ui/upload/UploadIFrameOnloadStrategy.java @@ -23,7 +23,7 @@ public class UploadIFrameOnloadStrategy { VUpload upload) /*-{ iframe.onload = $entry(function() { - upload.@com.vaadin.client.ui.VUpload::onSubmitComplete()(); + upload.@com.vaadin.v7.client.ui.VUpload::onSubmitComplete()(); }); }-*/; diff --git a/compatibility-client/src/main/java/com/vaadin/v7/client/ui/upload/UploadIFrameOnloadStrategyIE.java b/compatibility-client/src/main/java/com/vaadin/v7/client/ui/upload/UploadIFrameOnloadStrategyIE.java index a40abfafdf..cac9481986 100644 --- a/compatibility-client/src/main/java/com/vaadin/v7/client/ui/upload/UploadIFrameOnloadStrategyIE.java +++ b/compatibility-client/src/main/java/com/vaadin/v7/client/ui/upload/UploadIFrameOnloadStrategyIE.java @@ -28,7 +28,7 @@ public class UploadIFrameOnloadStrategyIE extends UploadIFrameOnloadStrategy { /*-{ iframe.onreadystatechange = $entry(function() { if (iframe.readyState == 'complete') { - upload.@com.vaadin.client.ui.VUpload::onSubmitComplete()(); + upload.@com.vaadin.v7.client.ui.VUpload::onSubmitComplete()(); } }); }-*/; |