I have a table who is displaying files. After a click on a row, i want to
download the file, which is represented by the row.
With vaadin 6 - it was able to open a resource via getMainWindow.open(…)
fileTable.addItemClickListener(new ItemClickEvent.ItemClickListener() {
public void itemClick(ItemClickEvent event){
...
FileDownloadResource fileDownloadResource = new FileDownloadResource(...)
getMainWindow().open(fileDownloadResource);
...
}
But now there’s no MainWindow anymore, and the open Methods of the
new Page Class aren’t able to open Resources - right?
But the FileDownloader needs an AbstractComponent to extend.
Now I want to start the Download via a context menu (from the table).
So the behavior is more like a normal file explorer
public void handleAction(Action action, Object sender, Object target) {
if (action == ACTION_OPENFILE) {
// here start Download
}
if (action == ACTION_DELETEFILE) {
....
}
}
Is there a way to use FileDownloader without extending another component ?
I’m also wondering if there has been any movement on this even though I’m relatively new to using Vaadin it might have been resolved and I’m not looking in the right place for it.