How to use Wicket’s DownloadLink with a file generated on the fly?
Can’t you use the constructor that takes a Model as argument? And make the Model generate the File in its getObject(). A LoadableDetachableModel is a good choice, given that load(), and therefore file generation, will be invoked only once. If the file is to be freshly generated every time the link is clicked, use DownloadLink.setDeleteAfterDownload(true) … Read more