Class DownloadUtil

java.lang.Object
com.vaadin.flow.component.shared.internal.DownloadUtil

public final class DownloadUtil extends Object
Internal utility for starting downloads from components.

For internal use only. May be renamed or removed in a future release.

Since:
25.4
  • Method Details

    • allowDisabledByClick

      public static com.vaadin.flow.server.streams.DownloadHandler allowDisabledByClick(com.vaadin.flow.component.Component component, DisableOnClickController<?> disableOnClickController, com.vaadin.flow.server.streams.DownloadHandler handler)
      Wraps the given download handler so that it is also served while the component is disabled by disable on click, which happens before the browser requests the file. A component disabled explicitly, or inside a disabled parent, still refuses the request unless the handler itself allows it.
      Parameters:
      component - the component that starts the download, not null
      disableOnClickController - the disable on click controller of the component, not null
      handler - the download handler to wrap, not null
      Returns:
      a handler that delegates to the given handler