Hi,
I’m using this component with a button, it work well but I would like to use a confirm dialog before the download, to inform the user with a message, an if the user confirm with “yes” answer I would like to download the file and cancel action if user answers “no”.
Is it possible to do that ?
I’m using this example :
Button button = new Button("Click to download");
FileDownloadWrapper buttonWrapper = new FileDownloadWrapper(
new StreamResource("foo.txt", () -> new ByteArrayInputStream("foo".getBytes())));
buttonWrapper.wrapComponent(button);
add(buttonWrapper);