diff options
author | Henri Sara <hesara@vaadin.com> | 2016-08-10 11:26:01 +0300 |
---|---|---|
committer | Henri Sara <hesara@vaadin.com> | 2016-08-11 15:34:22 +0300 |
commit | c726ae1b276049282286db3b0934e90ac8d8a2ce (patch) | |
tree | 86cdf6ac65acd3bd6c2908652178b99c9dc6c1ae /server/src/main/java/com/vaadin/ui/Upload.java | |
parent | 81b849c1af199be481e00c86ca324cfaffe8a7a0 (diff) | |
download | vaadin-framework-c726ae1b276049282286db3b0934e90ac8d8a2ce.tar.gz vaadin-framework-c726ae1b276049282286db3b0934e90ac8d8a2ce.zip |
Make immediate mode the default
Change-Id: I0a1fc0bf6f3de1b7d6975cd87cb7bb65c38dba4e
Diffstat (limited to 'server/src/main/java/com/vaadin/ui/Upload.java')
-rw-r--r-- | server/src/main/java/com/vaadin/ui/Upload.java | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/server/src/main/java/com/vaadin/ui/Upload.java b/server/src/main/java/com/vaadin/ui/Upload.java index a61bcf1bd9..0a88b40215 100644 --- a/server/src/main/java/com/vaadin/ui/Upload.java +++ b/server/src/main/java/com/vaadin/ui/Upload.java @@ -1194,6 +1194,27 @@ public class Upload extends AbstractComponent implements Component.Focusable, return super.getListeners(eventType); } + /** + * Returns the immediate mode of the component. + * <p> + * An immediate mode Upload component displays the browser file choosing + * button immediately, whereas a non-immediate upload only shows a Vaadin + * button. + * <p> + * The default mode of an Upload component is non-immediate. + * + * @return true if the component is in immediate mode, false if the + * component if not in immediate mode + */ + @Override + public boolean isImmediate() { + if (getExplicitImmediateValue() != null) { + return getExplicitImmediateValue(); + } else { + return false; + } + } + @Override protected UploadState getState() { return (UploadState) super.getState(); |