Class UploadFileList

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

@Tag("vaadin-upload-file-list") @NpmPackage(value="@vaadin/upload", version="25.1.0-beta1") @JsModule("@vaadin/upload/src/vaadin-upload-file-list.js") public class UploadFileList extends com.vaadin.flow.component.Component implements com.vaadin.flow.component.shared.HasThemeVariant<UploadFileListVariant>, com.vaadin.flow.component.HasSize, com.vaadin.flow.component.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 Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
    static final String
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a new empty file list without a manager.
    Creates a new file list linked to the given manager.
  • Method Summary

    Modifier and Type
    Method
    Description
    Get the internationalization object previously set for this component.
    Gets the upload manager that this component is linked to.
    void
    Set the internationalization properties for this component.
    default void
    Sets the upload manager that this component is linked to.

    Methods inherited from class com.vaadin.flow.component.Component

    addListener, bindVisible, findAncestor, fireEvent, from, get, getChildren, getElement, getEventBus, getId, getListeners, getLocale, getParent, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onAttach, onDetach, onEnabledStateChanged, removeFromParent, scrollIntoView, scrollIntoView, set, setElement, setId, setVisible

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.vaadin.flow.component.AttachNotifier

    addAttachListener

    Methods inherited from interface com.vaadin.flow.component.DetachNotifier

    addDetachListener

    Methods inherited from interface com.vaadin.flow.component.HasElement

    getElement

    Methods inherited from interface com.vaadin.flow.component.HasEnabled

    bindEnabled, isEnabled, setEnabled

    Methods inherited from interface com.vaadin.flow.component.HasSize

    bindHeight, bindWidth, getHeight, getHeightUnit, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getWidth, getWidthUnit, setHeight, setHeight, setHeightFull, setMaxHeight, setMaxHeight, setMaxWidth, setMaxWidth, setMinHeight, setMinHeight, setMinWidth, setMinWidth, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthFull

    Methods inherited from interface com.vaadin.flow.component.HasStyle

    addClassName, addClassNames, bindClassName, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassName

    Methods inherited from interface com.vaadin.flow.component.HasTheme

    addThemeName, addThemeNames, bindThemeName, getThemeName, getThemeNames, hasThemeName, removeThemeName, removeThemeNames, setThemeName, setThemeName

    Methods inherited from interface com.vaadin.flow.component.shared.HasThemeVariant

    addThemeVariants, bindThemeVariant, removeThemeVariants, setThemeVariant, setThemeVariants, setThemeVariants
  • 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