@Tag(value="vaadin-upload-file") @JsModule(value="@vaadin/vaadin-upload/src/vaadin-upload-file.js") public abstract class GeneratedVaadinUploadFile<R extends GeneratedVaadinUploadFile<R>> extends Component implements HasStyle
Description copied from corresponding location in WebComponent:
<vaadin-upload-file> element represents a file in the file list of
<vaadin-upload>.
The following shadow DOM parts are available for styling:
| Part name | Description |
|---|---|
row |
File container |
info |
Container for file status icon, file name, status and error messages |
done-icon |
File done status icon |
warning-icon |
File warning status icon |
meta |
Container for file name, status and error messages |
name |
File name |
error |
Error message, shown when error happens |
status |
Status message |
commands |
Container for file command icons |
start-button |
Start file upload button |
retry-button |
Retry file upload button |
clear-button |
Clear file button |
progress |
Progress bar |
The following state attributes are available for styling:
| Attribute | Description | Part name |
|---|---|---|
error |
An error has happened during uploading | :host |
indeterminate |
Uploading is in progress, but the progress value is unknown | :host |
uploading |
Uploading is in progress | :host |
complete |
Uploading has finished successfully | :host |
| Modifier and Type | Class and Description |
|---|---|
static class |
GeneratedVaadinUploadFile.FileAbortEvent<R extends GeneratedVaadinUploadFile<R>> |
static class |
GeneratedVaadinUploadFile.FileRemoveEvent<R extends GeneratedVaadinUploadFile<R>> |
static class |
GeneratedVaadinUploadFile.FileRetryEvent<R extends GeneratedVaadinUploadFile<R>> |
static class |
GeneratedVaadinUploadFile.FileStartEvent<R extends GeneratedVaadinUploadFile<R>> |
| Constructor and Description |
|---|
GeneratedVaadinUploadFile() |
| Modifier and Type | Method and Description |
|---|---|
protected Registration |
addFileAbortListener(ComponentEventListener<GeneratedVaadinUploadFile.FileAbortEvent<R>> listener)
Adds a listener for
file-abort events fired by the webcomponent. |
protected Registration |
addFileRemoveListener(ComponentEventListener<GeneratedVaadinUploadFile.FileRemoveEvent<R>> listener)
Adds a listener for
file-remove events fired by the webcomponent. |
protected Registration |
addFileRetryListener(ComponentEventListener<GeneratedVaadinUploadFile.FileRetryEvent<R>> listener)
Adds a listener for
file-retry events fired by the webcomponent. |
protected Registration |
addFileStartListener(ComponentEventListener<GeneratedVaadinUploadFile.FileStartEvent<R>> listener)
Adds a listener for
file-start events fired by the webcomponent. |
protected elemental.json.JsonObject |
getFileJsonObject()
This property is not synchronized automatically from the client side, so
the returned value may not be the same as in client side.
|
protected void |
setFile(elemental.json.JsonObject file) |
addListener, fireEvent, from, get, getChildren, getElement, getEventBus, getId, getLocale, getParent, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onAttach, onDetach, onEnabledStateChanged, set, setElement, setId, setVisibleclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassNamegetElementaddAttachListeneraddDetachListenerprotected elemental.json.JsonObject getFileJsonObject()
file property from the webcomponentprotected void setFile(elemental.json.JsonObject file)
file - the JsonObject value to setprotected Registration addFileAbortListener(ComponentEventListener<GeneratedVaadinUploadFile.FileAbortEvent<R>> listener)
file-abort events fired by the webcomponent.listener - the listenerRegistration for removing the event listenerprotected Registration addFileRemoveListener(ComponentEventListener<GeneratedVaadinUploadFile.FileRemoveEvent<R>> listener)
file-remove events fired by the webcomponent.listener - the listenerRegistration for removing the event listenerprotected Registration addFileRetryListener(ComponentEventListener<GeneratedVaadinUploadFile.FileRetryEvent<R>> listener)
file-retry events fired by the webcomponent.listener - the listenerRegistration for removing the event listenerprotected Registration addFileStartListener(ComponentEventListener<GeneratedVaadinUploadFile.FileStartEvent<R>> listener)
file-start events fired by the webcomponent.listener - the listenerRegistration for removing the event listenerCopyright © 2025. All rights reserved.