From 286d2d80873b315205057205735b74463641f5d0 Mon Sep 17 00:00:00 2001 From: Marc Englund Date: Fri, 3 Jul 2009 12:37:39 +0000 Subject: Upload progress listeners called when appropriate, fixes #3102 svn changeset:8315/svn branch:6.0 --- src/com/vaadin/ui/Upload.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/com/vaadin/ui/Upload.java b/src/com/vaadin/ui/Upload.java index 238217a4c2..70e16e1ded 100644 --- a/src/com/vaadin/ui/Upload.java +++ b/src/com/vaadin/ui/Upload.java @@ -161,7 +161,8 @@ public class Upload extends AbstractComponent implements Component.Focusable { while ((bytesRead = in.read(buffer)) > 0) { out.write(buffer, 0, bytesRead); totalBytes += bytesRead; - if (progressListener != null && contentLength > 0) { + if (contentLength > 0 + && (progressListeners != null || progressListener != null)) { // update progress if listener set and contentLength // received synchronized (application) { -- cgit v1.2.3