aboutsummaryrefslogtreecommitdiffstats
path: root/server/src/main/java/com/vaadin/ui/Upload.java
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/main/java/com/vaadin/ui/Upload.java')
-rw-r--r--server/src/main/java/com/vaadin/ui/Upload.java21
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();