Class GeneratedVaadinUpload<R extends GeneratedVaadinUpload<R>>
- java.lang.Object
-
- com.vaadin.flow.component.Component
-
- com.vaadin.flow.component.upload.GeneratedVaadinUpload<R>
-
- All Implemented Interfaces:
com.vaadin.flow.component.AttachNotifier,com.vaadin.flow.component.DetachNotifier,com.vaadin.flow.component.HasElement,com.vaadin.flow.component.HasStyle,Serializable
- Direct Known Subclasses:
Upload
@Tag("vaadin-upload") @NpmPackage(value="@vaadin/polymer-legacy-adapter",version="23.0.0") @NpmPackage(value="@vaadin/upload",version="23.0.0") @NpmPackage(value="@vaadin/vaadin-upload",version="23.0.0") @JsModule("@vaadin/polymer-legacy-adapter/style-modules.js") @JsModule("@vaadin/upload/src/vaadin-upload.js") public abstract class GeneratedVaadinUpload<R extends GeneratedVaadinUpload<R>> extends com.vaadin.flow.component.Component implements com.vaadin.flow.component.HasStyleDescription copied from corresponding location in WebComponent:
<vaadin-upload>is a Web Component for uploading multiple files with drag and drop support.Example:
<vaadin-upload></vaadin-upload>Styling
The following shadow DOM parts are available for styling:
Part name Description primary-buttonsUpload container upload-buttonUpload button drop-labelLabel for drop indicator drop-label-iconIcon for drop indicator file-listFile list container The following state attributes are available for styling:
Attribute Description Part name nodropSet when drag and drop is disabled (e. g., on touch devices) :hostdragoverA file is being dragged over the element :hostdragover-validA dragged file is valid with maxFilesandacceptcriteria:host- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Constructor Summary
Constructors Constructor Description GeneratedVaadinUpload()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected com.vaadin.flow.shared.RegistrationaddFileRejectListener(com.vaadin.flow.component.ComponentEventListener<GeneratedVaadinUpload.FileRejectEvent<R>> listener)Adds a listener forfile-rejectevents fired by the webcomponent.protected com.vaadin.flow.shared.RegistrationaddFilesChangeListener(com.vaadin.flow.component.ComponentEventListener<GeneratedVaadinUpload.FilesChangeEvent<R>> listener)Adds a listener forfiles-changedevents fired by the webcomponent.protected com.vaadin.flow.shared.RegistrationaddMaxFilesReachedChangeListener(com.vaadin.flow.component.ComponentEventListener<GeneratedVaadinUpload.MaxFilesReachedChangeEvent<R>> listener)Adds a listener formax-files-reached-changedevents fired by the webcomponent.protected voidaddToAddButton(com.vaadin.flow.component.Component... components)Adds the given components as children of this component at the slot 'add-button'.protected voidaddToDropLabel(com.vaadin.flow.component.Component... components)Adds the given components as children of this component at the slot 'drop-label'.protected voidaddToDropLabelIcon(com.vaadin.flow.component.Component... components)Adds the given components as children of this component at the slot 'drop-label-icon'.protected voidaddToFileList(com.vaadin.flow.component.Component... components)Adds the given components as children of this component at the slot 'file-list'.protected com.vaadin.flow.shared.RegistrationaddUploadAbortListener(com.vaadin.flow.component.ComponentEventListener<GeneratedVaadinUpload.UploadAbortEvent<R>> listener)Adds a listener forupload-abortevents fired by the webcomponent.protected com.vaadin.flow.shared.RegistrationaddUploadBeforeListener(com.vaadin.flow.component.ComponentEventListener<GeneratedVaadinUpload.UploadBeforeEvent<R>> listener)Adds a listener forupload-beforeevents fired by the webcomponent.protected com.vaadin.flow.shared.RegistrationaddUploadErrorListener(com.vaadin.flow.component.ComponentEventListener<GeneratedVaadinUpload.UploadErrorEvent<R>> listener)Adds a listener forupload-errorevents fired by the webcomponent.protected com.vaadin.flow.shared.RegistrationaddUploadProgressListener(com.vaadin.flow.component.ComponentEventListener<GeneratedVaadinUpload.UploadProgressEvent<R>> listener)Adds a listener forupload-progressevents fired by the webcomponent.protected com.vaadin.flow.shared.RegistrationaddUploadRequestListener(com.vaadin.flow.component.ComponentEventListener<GeneratedVaadinUpload.UploadRequestEvent<R>> listener)Adds a listener forupload-requestevents fired by the webcomponent.protected com.vaadin.flow.shared.RegistrationaddUploadResponseListener(com.vaadin.flow.component.ComponentEventListener<GeneratedVaadinUpload.UploadResponseEvent<R>> listener)Adds a listener forupload-responseevents fired by the webcomponent.protected com.vaadin.flow.shared.RegistrationaddUploadRetryListener(com.vaadin.flow.component.ComponentEventListener<GeneratedVaadinUpload.UploadRetryEvent<R>> listener)Adds a listener forupload-retryevents fired by the webcomponent.protected com.vaadin.flow.shared.RegistrationaddUploadStartListener(com.vaadin.flow.component.ComponentEventListener<GeneratedVaadinUpload.UploadStartEvent<R>> listener)Adds a listener forupload-startevents fired by the webcomponent.protected com.vaadin.flow.shared.RegistrationaddUploadSuccessListener(com.vaadin.flow.component.ComponentEventListener<GeneratedVaadinUpload.UploadSuccessEvent<R>> listener)Adds a listener forupload-successevents fired by the webcomponent.protected StringgetAcceptString()Description copied from corresponding location in WebComponent:protected StringgetCaptureString()Description copied from corresponding location in WebComponent:protected elemental.json.JsonArraygetFilesJsonArray()Description copied from corresponding location in WebComponent:protected StringgetFormDataNameString()Description copied from corresponding location in WebComponent:protected elemental.json.JsonObjectgetHeadersJsonObject()Description copied from corresponding location in WebComponent:protected elemental.json.JsonObjectgetI18nJsonObject()Description copied from corresponding location in WebComponent:protected doublegetMaxFilesDouble()Description copied from corresponding location in WebComponent:protected doublegetMaxFileSizeDouble()Description copied from corresponding location in WebComponent:protected StringgetMethodString()Description copied from corresponding location in WebComponent:protected StringgetTargetString()Description copied from corresponding location in WebComponent:protected doublegetTimeoutDouble()Description copied from corresponding location in WebComponent:protected booleanisMaxFilesReachedBoolean()Description copied from corresponding location in WebComponent:protected booleanisNoAutoBoolean()Description copied from corresponding location in WebComponent:protected booleanisNodropBoolean()Description copied from corresponding location in WebComponent:protected booleanisWithCredentialsBoolean()Description copied from corresponding location in WebComponent:protected voidremove(com.vaadin.flow.component.Component... components)Removes the given child components from this component.protected voidremoveAll()Removes all contents from this component, this includes child components, text content as well as child elements that have been added directly to this component using theElementAPI.protected voidsetAccept(String accept)Description copied from corresponding location in WebComponent:protected voidsetCapture(String capture)Description copied from corresponding location in WebComponent:protected voidsetFiles(elemental.json.JsonArray files)Description copied from corresponding location in WebComponent:protected voidsetFormDataName(String formDataName)Description copied from corresponding location in WebComponent:protected voidsetHeaders(elemental.json.JsonObject headers)Description copied from corresponding location in WebComponent:protected voidsetI18n(elemental.json.JsonObject i18n)Description copied from corresponding location in WebComponent:protected voidsetMaxFiles(double maxFiles)Description copied from corresponding location in WebComponent:protected voidsetMaxFileSize(double maxFileSize)Description copied from corresponding location in WebComponent:protected voidsetMethod(String method)Description copied from corresponding location in WebComponent:protected voidsetNoAuto(boolean noAuto)Description copied from corresponding location in WebComponent:protected voidsetNodrop(boolean nodrop)Description copied from corresponding location in WebComponent:protected voidsetTarget(String target)Description copied from corresponding location in WebComponent:protected voidsetTimeout(double timeout)Description copied from corresponding location in WebComponent:protected voidsetWithCredentials(boolean withCredentials)Description copied from corresponding location in WebComponent:protected voiduploadFiles(elemental.json.JsonObject files)Description copied from corresponding location in WebComponent:-
Methods inherited from class com.vaadin.flow.component.Component
addListener, fireEvent, from, get, getChildren, getElement, getEventBus, getId, getLocale, getParent, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onAttach, onDetach, onEnabledStateChanged, set, setElement, setId, setVisible
-
-
-
-
Method Detail
-
isNodropBoolean
protected boolean isNodropBoolean()
Description copied from corresponding location in WebComponent:
Define whether the element supports dropping files on it for uploading. By default it's enabled in desktop and disabled in touch devices because mobile devices do not support drag events in general. Setting it false means that drop is enabled even in touch-devices, and true disables drop in all devices.
This property is not synchronized automatically from the client side, so the returned value may not be the same as in client side.
- Returns:
- the
nodropproperty from the webcomponent
-
setNodrop
protected void setNodrop(boolean nodrop)
Description copied from corresponding location in WebComponent:
Define whether the element supports dropping files on it for uploading. By default it's enabled in desktop and disabled in touch devices because mobile devices do not support drag events in general. Setting it false means that drop is enabled even in touch-devices, and true disables drop in all devices.
- Parameters:
nodrop- the boolean value to set
-
getTargetString
protected String getTargetString()
Description copied from corresponding location in WebComponent:
The server URL. The default value is an empty string, which means that window.location will be used.
This property is not synchronized automatically from the client side, so the returned value may not be the same as in client side.
- Returns:
- the
targetproperty from the webcomponent
-
setTarget
protected void setTarget(String target)
Description copied from corresponding location in WebComponent:
The server URL. The default value is an empty string, which means that window.location will be used.
- Parameters:
target- the String value to set
-
getMethodString
protected String getMethodString()
Description copied from corresponding location in WebComponent:
HTTP Method used to send the files. Only POST and PUT are allowed.
This property is not synchronized automatically from the client side, so the returned value may not be the same as in client side.
- Returns:
- the
methodproperty from the webcomponent
-
setMethod
protected void setMethod(String method)
Description copied from corresponding location in WebComponent:
HTTP Method used to send the files. Only POST and PUT are allowed.
- Parameters:
method- the String value to set
-
getHeadersJsonObject
protected elemental.json.JsonObject getHeadersJsonObject()
Description copied from corresponding location in WebComponent:
Key-Value map to send to the server. If you set this property as an attribute, use a valid JSON string, for example:
<vaadin-upload headers=' "X-Foo": "Bar"'>}This property is not synchronized automatically from the client side, so the returned value may not be the same as in client side.
- Returns:
- the
headersproperty from the webcomponent
-
setHeaders
protected void setHeaders(elemental.json.JsonObject headers)
Description copied from corresponding location in WebComponent:
Key-Value map to send to the server. If you set this property as an attribute, use a valid JSON string, for example:
<vaadin-upload headers=' "X-Foo": "Bar"'>}- Parameters:
headers- the JsonObject value to set
-
getTimeoutDouble
protected double getTimeoutDouble()
Description copied from corresponding location in WebComponent:
Max time in milliseconds for the entire upload process, if exceeded the request will be aborted. Zero means that there is no timeout.
<p>This property is not synchronized automatically from the client side, so the returned value may not be the same as in client side.- Returns:
- the
timeoutproperty from the webcomponent
-
setTimeout
protected void setTimeout(double timeout)
Description copied from corresponding location in WebComponent:
Max time in milliseconds for the entire upload process, if exceeded the request will be aborted. Zero means that there is no timeout.
- Parameters:
timeout- the double value to set
-
getFilesJsonArray
@Synchronize(property="files", value="files-changed") protected elemental.json.JsonArray getFilesJsonArray()Description copied from corresponding location in WebComponent:
The array of files being processed, or already uploaded.
Each element is a
Fileobject with a number of extra properties to track the upload process:uploadTarget: The target URL used to upload this file.elapsed: Elapsed time since the upload started.elapsedStr: Human-readable elapsed time.remaining: Number of seconds remaining for the upload to finish.remainingStr: Human-readable remaining time for the upload to finish.progress: Percentage of the file already uploaded.speed: Upload speed in kB/s.size: File size in bytes.totalStr: Human-readable total size of the file.loaded: Bytes transferred so far.loadedStr: Human-readable uploaded size at the moment.status: Status of the upload process.error: Error message in case the upload failed.abort: True if the file was canceled by the user.complete: True when the file was transferred to the server.uploading: True while transferring data to the server.This property is synchronized automatically from client side when a 'files-changed' event happens.
- Returns:
- the
filesproperty from the webcomponent
-
setFiles
protected void setFiles(elemental.json.JsonArray files)
Description copied from corresponding location in WebComponent:
The array of files being processed, or already uploaded.
Each element is a
Fileobject with a number of extra properties to track the upload process:uploadTarget: The target URL used to upload this file.elapsed: Elapsed time since the upload started.elapsedStr: Human-readable elapsed time.remaining: Number of seconds remaining for the upload to finish.remainingStr: Human-readable remaining time for the upload to finish.progress: Percentage of the file already uploaded.speed: Upload speed in kB/s.size: File size in bytes.totalStr: Human-readable total size of the file.loaded: Bytes transferred so far.loadedStr: Human-readable uploaded size at the moment.status: Status of the upload process.error: Error message in case the upload failed.abort: True if the file was canceled by the user.complete: True when the file was transferred to the server.uploading: True while transferring data to the server.
- Parameters:
files- the JsonArray value to set
-
getMaxFilesDouble
protected double getMaxFilesDouble()
Description copied from corresponding location in WebComponent:
Limit of files to upload, by default it is unlimited. If the value is set to one, native file browser will prevent selecting multiple files.
This property is not synchronized automatically from the client side, so the returned value may not be the same as in client side.
- Returns:
- the
maxFilesproperty from the webcomponent
-
setMaxFiles
protected void setMaxFiles(double maxFiles)
Description copied from corresponding location in WebComponent:
Limit of files to upload, by default it is unlimited. If the value is set to one, native file browser will prevent selecting multiple files.
- Parameters:
maxFiles- the double value to set
-
isMaxFilesReachedBoolean
@Synchronize(property="maxFilesReached", value="max-files-reached-changed") protected boolean isMaxFilesReachedBoolean()Description copied from corresponding location in WebComponent:
Specifies if the maximum number of files have been uploaded
This property is synchronized automatically from client side when a 'max-files-reached-changed' event happens.
- Returns:
- the
maxFilesReachedproperty from the webcomponent
-
getAcceptString
protected String getAcceptString()
Description copied from corresponding location in WebComponent:
Specifies the types of files that the server accepts. Syntax: a comma-separated list of MIME type patterns (wildcards are allowed) or file extensions. Notice that MIME types are widely supported, while file extensions are only implemented in certain browsers, so avoid using it. Example: accept="video/*,image/tiff" or accept=".pdf,audio/mp3"
This property is not synchronized automatically from the client side, so the returned value may not be the same as in client side.
- Returns:
- the
acceptproperty from the webcomponent
-
setAccept
protected void setAccept(String accept)
Description copied from corresponding location in WebComponent:
Specifies the types of files that the server accepts. Syntax: a comma-separated list of MIME type patterns (wildcards are allowed) or file extensions. Notice that MIME types are widely supported, while file extensions are only implemented in certain browsers, so avoid using it. Example: accept="video/*,image/tiff" or accept=".pdf,audio/mp3"
- Parameters:
accept- the String value to set
-
getMaxFileSizeDouble
protected double getMaxFileSizeDouble()
Description copied from corresponding location in WebComponent:
Specifies the maximum file size in bytes allowed to upload. Notice that it is a client-side constraint, which will be checked before sending the request. Obviously you need to do the same validation in the server-side and be sure that they are aligned.
This property is not synchronized automatically from the client side, so the returned value may not be the same as in client side.
- Returns:
- the
maxFileSizeproperty from the webcomponent
-
setMaxFileSize
protected void setMaxFileSize(double maxFileSize)
Description copied from corresponding location in WebComponent:
Specifies the maximum file size in bytes allowed to upload. Notice that it is a client-side constraint, which will be checked before sending the request. Obviously you need to do the same validation in the server-side and be sure that they are aligned.
- Parameters:
maxFileSize- the double value to set
-
getFormDataNameString
protected String getFormDataNameString()
Description copied from corresponding location in WebComponent:
Specifies the 'name' property at Content-Disposition
This property is not synchronized automatically from the client side, so the returned value may not be the same as in client side.
- Returns:
- the
formDataNameproperty from the webcomponent
-
setFormDataName
protected void setFormDataName(String formDataName)
Description copied from corresponding location in WebComponent:
Specifies the 'name' property at Content-Disposition
- Parameters:
formDataName- the String value to set
-
isNoAutoBoolean
protected boolean isNoAutoBoolean()
Description copied from corresponding location in WebComponent:
Prevents upload(s) from immediately uploading upon adding file(s). When set, you must manually trigger uploads using the
uploadFilesmethodThis property is not synchronized automatically from the client side, so the returned value may not be the same as in client side.
- Returns:
- the
noAutoproperty from the webcomponent
-
setNoAuto
protected void setNoAuto(boolean noAuto)
Description copied from corresponding location in WebComponent:
Prevents upload(s) from immediately uploading upon adding file(s). When set, you must manually trigger uploads using the
uploadFilesmethod- Parameters:
noAuto- the boolean value to set
-
isWithCredentialsBoolean
protected boolean isWithCredentialsBoolean()
Description copied from corresponding location in WebComponent:
Set the withCredentials flag on the request.
This property is not synchronized automatically from the client side, so the returned value may not be the same as in client side.
- Returns:
- the
withCredentialsproperty from the webcomponent
-
setWithCredentials
protected void setWithCredentials(boolean withCredentials)
Description copied from corresponding location in WebComponent:
Set the withCredentials flag on the request.
- Parameters:
withCredentials- the boolean value to set
-
getCaptureString
protected String getCaptureString()
Description copied from corresponding location in WebComponent:
Pass-through to input's capture attribute. Allows user to trigger device inputs such as camera or microphone immediately.
This property is not synchronized automatically from the client side, so the returned value may not be the same as in client side.
- Returns:
- the
captureproperty from the webcomponent
-
setCapture
protected void setCapture(String capture)
Description copied from corresponding location in WebComponent:
Pass-through to input's capture attribute. Allows user to trigger device inputs such as camera or microphone immediately.
- Parameters:
capture- the String value to set
-
getI18nJsonObject
protected elemental.json.JsonObject getI18nJsonObject()
Description copied from corresponding location in WebComponent:
The object used to localize this component. For changing the default localization, change the entire i18n object or just the property you want to modify.
The object has the following JSON structure and default values:
{ dropFiles: { one: 'Drop file here many: 'Drop files here }, addFiles: { one: 'Select File...', many: 'Upload Files...' }, cancel: 'Cancel', error: { tooManyFiles: 'Too Many Files.', fileIsTooBig: 'File is Too Big.', incorrectFileType: 'Incorrect File Type.' }, uploading: { status: { connecting: 'Connecting...', stalled: 'Stalled.', processing: 'Processing File...', held: 'Queued' }, remainingTime: { prefix: 'remaining time: ', unknown: 'unknown remaining time' }, error: { serverUnavailable: 'Server Unavailable', unexpectedServerError: 'Unexpected Server Error', forbidden: 'Forbidden' } }, units: { size: ['B', 'kB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'] }, formatSize: function(bytes) { // returns the size followed by the best suitable unit }, formatTime: function(seconds, [secs, mins, hours]) { // returns a 'HH:MM:SS' string } }<p>This property is not synchronized automatically from the client side, so the returned value may not be the same as in client side.- Returns:
- the
i18nproperty from the webcomponent
-
setI18n
protected void setI18n(elemental.json.JsonObject i18n)
Description copied from corresponding location in WebComponent:
The object used to localize this component. For changing the default localization, change the entire i18n object or just the property you want to modify.
The object has the following JSON structure and default values:
{ dropFiles: { one: 'Drop file here many: 'Drop files here }, addFiles: { one: 'Select File...', many: 'Upload Files...' }, cancel: 'Cancel', error: { tooManyFiles: 'Too Many Files.', fileIsTooBig: 'File is Too Big.', incorrectFileType: 'Incorrect File Type.' }, uploading: { status: { connecting: 'Connecting...', stalled: 'Stalled.', processing: 'Processing File...', held: 'Queued' }, remainingTime: { prefix: 'remaining time: ', unknown: 'unknown remaining time' }, error: { serverUnavailable: 'Server Unavailable', unexpectedServerError: 'Unexpected Server Error', forbidden: 'Forbidden' } }, units: { size: ['B', 'kB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'] }, formatSize: function(bytes) { // returns the size followed by the best suitable unit }, formatTime: function(seconds, [secs, mins, hours]) { // returns a 'HH:MM:SS' string } }- Parameters:
i18n- the JsonObject value to set
-
uploadFiles
protected void uploadFiles(elemental.json.JsonObject files)
Description copied from corresponding location in WebComponent:
Triggers the upload of any files that are not completed
- Parameters:
files- Missing documentation!
-
addFileRejectListener
protected com.vaadin.flow.shared.Registration addFileRejectListener(com.vaadin.flow.component.ComponentEventListener<GeneratedVaadinUpload.FileRejectEvent<R>> listener)
Adds a listener forfile-rejectevents fired by the webcomponent.- Parameters:
listener- the listener- Returns:
- a
Registrationfor removing the event listener
-
addUploadAbortListener
protected com.vaadin.flow.shared.Registration addUploadAbortListener(com.vaadin.flow.component.ComponentEventListener<GeneratedVaadinUpload.UploadAbortEvent<R>> listener)
Adds a listener forupload-abortevents fired by the webcomponent.- Parameters:
listener- the listener- Returns:
- a
Registrationfor removing the event listener
-
addUploadBeforeListener
protected com.vaadin.flow.shared.Registration addUploadBeforeListener(com.vaadin.flow.component.ComponentEventListener<GeneratedVaadinUpload.UploadBeforeEvent<R>> listener)
Adds a listener forupload-beforeevents fired by the webcomponent.- Parameters:
listener- the listener- Returns:
- a
Registrationfor removing the event listener
-
addUploadErrorListener
protected com.vaadin.flow.shared.Registration addUploadErrorListener(com.vaadin.flow.component.ComponentEventListener<GeneratedVaadinUpload.UploadErrorEvent<R>> listener)
Adds a listener forupload-errorevents fired by the webcomponent.- Parameters:
listener- the listener- Returns:
- a
Registrationfor removing the event listener
-
addUploadProgressListener
protected com.vaadin.flow.shared.Registration addUploadProgressListener(com.vaadin.flow.component.ComponentEventListener<GeneratedVaadinUpload.UploadProgressEvent<R>> listener)
Adds a listener forupload-progressevents fired by the webcomponent.- Parameters:
listener- the listener- Returns:
- a
Registrationfor removing the event listener
-
addUploadRequestListener
protected com.vaadin.flow.shared.Registration addUploadRequestListener(com.vaadin.flow.component.ComponentEventListener<GeneratedVaadinUpload.UploadRequestEvent<R>> listener)
Adds a listener forupload-requestevents fired by the webcomponent.- Parameters:
listener- the listener- Returns:
- a
Registrationfor removing the event listener
-
addUploadResponseListener
protected com.vaadin.flow.shared.Registration addUploadResponseListener(com.vaadin.flow.component.ComponentEventListener<GeneratedVaadinUpload.UploadResponseEvent<R>> listener)
Adds a listener forupload-responseevents fired by the webcomponent.- Parameters:
listener- the listener- Returns:
- a
Registrationfor removing the event listener
-
addUploadRetryListener
protected com.vaadin.flow.shared.Registration addUploadRetryListener(com.vaadin.flow.component.ComponentEventListener<GeneratedVaadinUpload.UploadRetryEvent<R>> listener)
Adds a listener forupload-retryevents fired by the webcomponent.- Parameters:
listener- the listener- Returns:
- a
Registrationfor removing the event listener
-
addUploadStartListener
protected com.vaadin.flow.shared.Registration addUploadStartListener(com.vaadin.flow.component.ComponentEventListener<GeneratedVaadinUpload.UploadStartEvent<R>> listener)
Adds a listener forupload-startevents fired by the webcomponent.- Parameters:
listener- the listener- Returns:
- a
Registrationfor removing the event listener
-
addUploadSuccessListener
protected com.vaadin.flow.shared.Registration addUploadSuccessListener(com.vaadin.flow.component.ComponentEventListener<GeneratedVaadinUpload.UploadSuccessEvent<R>> listener)
Adds a listener forupload-successevents fired by the webcomponent.- Parameters:
listener- the listener- Returns:
- a
Registrationfor removing the event listener
-
addFilesChangeListener
protected com.vaadin.flow.shared.Registration addFilesChangeListener(com.vaadin.flow.component.ComponentEventListener<GeneratedVaadinUpload.FilesChangeEvent<R>> listener)
Adds a listener forfiles-changedevents fired by the webcomponent.- Parameters:
listener- the listener- Returns:
- a
Registrationfor removing the event listener
-
addMaxFilesReachedChangeListener
protected com.vaadin.flow.shared.Registration addMaxFilesReachedChangeListener(com.vaadin.flow.component.ComponentEventListener<GeneratedVaadinUpload.MaxFilesReachedChangeEvent<R>> listener)
Adds a listener formax-files-reached-changedevents fired by the webcomponent.- Parameters:
listener- the listener- Returns:
- a
Registrationfor removing the event listener
-
addToAddButton
protected void addToAddButton(com.vaadin.flow.component.Component... components)
Adds the given components as children of this component at the slot 'add-button'.- Parameters:
components- The components to add.- See Also:
- MDN page about slots, Spec website about slots
-
addToDropLabelIcon
protected void addToDropLabelIcon(com.vaadin.flow.component.Component... components)
Adds the given components as children of this component at the slot 'drop-label-icon'.- Parameters:
components- The components to add.- See Also:
- MDN page about slots, Spec website about slots
-
addToDropLabel
protected void addToDropLabel(com.vaadin.flow.component.Component... components)
Adds the given components as children of this component at the slot 'drop-label'.- Parameters:
components- The components to add.- See Also:
- MDN page about slots, Spec website about slots
-
addToFileList
protected void addToFileList(com.vaadin.flow.component.Component... components)
Adds the given components as children of this component at the slot 'file-list'.- Parameters:
components- The components to add.- See Also:
- MDN page about slots, Spec website about slots
-
remove
protected void remove(com.vaadin.flow.component.Component... components)
Removes the given child components from this component.- Parameters:
components- The components to remove.- Throws:
IllegalArgumentException- if any of the components is not a child of this component.
-
removeAll
protected void removeAll()
Removes all contents from this component, this includes child components, text content as well as child elements that have been added directly to this component using theElementAPI.
-
-