diff options
author | Anna Koskinen <Ansku@users.noreply.github.com> | 2020-04-03 13:24:11 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-03 13:24:11 +0300 |
commit | 240cdce985bfc08a6e2869d1de52718227706640 (patch) | |
tree | d0696afd50c4d71e8304f0dbc0e1ed3f0fec7e40 /server | |
parent | 52013fc6c6ccc0891df79b7fa2c7cce1b9a4f036 (diff) | |
download | vaadin-framework-240cdce985bfc08a6e2869d1de52718227706640.tar.gz vaadin-framework-240cdce985bfc08a6e2869d1de52718227706640.zip |
Prevent upload if no file is selected. (#11939)
Fixes #10419
Diffstat (limited to 'server')
-rw-r--r-- | server/src/main/java/com/vaadin/ui/Upload.java | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/server/src/main/java/com/vaadin/ui/Upload.java b/server/src/main/java/com/vaadin/ui/Upload.java index 018b06e581..de2d520438 100644 --- a/server/src/main/java/com/vaadin/ui/Upload.java +++ b/server/src/main/java/com/vaadin/ui/Upload.java @@ -1038,21 +1038,20 @@ public class Upload extends AbstractComponent } /** - * Forces the upload the send selected file to the server. + * Instructs the upload component to send selected file to the server. * <p> * In case developer wants to use this feature, he/she will most probably - * want to hide the uploads internal submit button by setting its caption to - * null with {@link #setButtonCaption(String)} method. + * want to hide the upload component's internal submit button by setting its + * caption to null with {@link #setButtonCaption(String)} method. * <p> - * Note, that the upload runs asynchronous. Developer should use normal - * upload listeners to trac the process of upload. If the field is empty - * uploaded the file name will be empty string and file length 0 in the - * upload finished event. + * Note that the upload runs asynchronously. Developer should use normal + * upload listeners to track the process of upload. If the file name field + * is empty, no upload will be triggered. * <p> - * Also note, that the developer should not remove or modify the upload in - * the same user transaction where the upload submit is requested. The - * upload may safely be hidden or removed once the upload started event is - * fired. + * Also note that the developer should not remove or modify the upload + * component in the same user transaction where the upload submit is + * requested. The upload component can be safely hidden or removed once the + * upload started event has been fired. */ public void submitUpload() { markAsDirty(); |