Class UploadFileList

java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.upload.UploadFileList
All Implemented Interfaces:
AttachNotifier, DetachNotifier, HasElement, HasEnabled, HasSize, HasStyle, HasTheme, HasThemeVariant<UploadFileListVariant>, Serializable

@Tag("vaadin-upload-file-list") @NpmPackage(value="@vaadin/upload", version="25.1.0-alpha9") @JsModule("@vaadin/upload/src/vaadin-upload-file-list.js") public class UploadFileList extends Component implements HasThemeVariant<UploadFileListVariant>, HasSize, HasEnabled
A component that displays the list of files being uploaded. When linked to an UploadManager, it automatically displays upload progress, status, and controls for each file.

The component automatically syncs files from the manager and forwards retry/abort/start events back to the manager.

Example usage with UploadManager:

 var manager = new UploadManager(uploadHandler);
 var fileList = new UploadFileList(manager);
 add(fileList);
 
Author:
Vaadin Ltd.
See Also:
  • Field Details

  • Constructor Details

    • UploadFileList

      public UploadFileList()
      Creates a new empty file list without a manager. The manager must be set later using setUploadManager(UploadManager).
    • UploadFileList

      public UploadFileList(UploadManager manager)
      Creates a new file list linked to the given manager.
      Parameters:
      manager - the upload manager to link to, not null
      Throws:
      NullPointerException - if manager is null
  • Method Details

    • setI18n

      public void setI18n(UploadFileListI18N i18n)
      Set the internationalization properties for this component.
      Parameters:
      i18n - the i18n object, not null
    • getI18n

      public UploadFileListI18N getI18n()
      Get the internationalization object previously set for this component.

      NOTE: Updating the instance that is returned from this method will not update the component if not set again using setI18n(UploadFileListI18N)

      Returns:
      the i18n object or null if no i18n object has been set
    • getUploadManager

      default UploadManager getUploadManager()
      Gets the upload manager that this component is linked to.
      Returns:
      the upload manager, or null if not linked
    • setUploadManager

      default void setUploadManager(UploadManager manager)
      Sets the upload manager that this component is linked to.
      Parameters:
      manager - the upload manager, or null to unlink