Hi all,
I have an Anchor that downloads a generated file. The problem is that when I try to add an event listener for a click to close the dialog that the Anchor is in, the link to the download doesn’t work.
Hello Tatu Lund,
it is going into the click listener and using the close() method, but the link for the download of the file is generating this error:
HTTP ERROR 404
Problem accessing /VAADIN/dynamic/resource/0/c1cd5f84-d00d-4cf4-8330-b1b24add6220/Changelog.zip. Reason:
Resource is not found for path=VAADIN/dynamic/resource/0/c1cd5f84-d00d-4cf4-8330-b1b24add6220/Changelog.zip
Powered by Jetty:// 9.4.11.v20180605
However, if I run the code in Debug mode and I stop in the click listener, it works. I think the problem is that the click event is executing before generating StreamResource and when the href is opened the anchor doesn’t exist because the dialog, that contains the anchor, has been closed.