Hi,
In this following code, I use a FileDownloader component.
And when I click on the button, I must wait for the download to finish
How can I continue my browsing on my application without waiting the end of download ? Like an another thread ?
For information, I use java 7.
private void initialiserBoutonExport() {
StreamResource ressource = new StreamResource(new StreamResource.StreamSource() {
private static final long serialVersionUID = 1L;
@Override
public InputStream getStream() {
try {
return restituerExtraction();
} catch (Exception e) {
e.printStackTrace();
}
return null;
}
}, "default");
ressource.setCacheTime(-1);
ressource.setMIMEType("application/xls");
fileDownloaderExtraction = new FileDownloader(ressource);
fileDownloaderExtraction.extend(getMainView().getRechercheHeaderComponent().getExporterButton());
}
Thanks