Download File from Table

Hello - so my first steps with vaadin 7 …

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?

Can anyone help me to get the Download working?

Thanks
Peter

See
https://vaadin.com/wiki/-/wiki/Main/Letting%20the%20user%20download%20a%20file

Thanks for the quick answer …

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 ?

Thanks
Peter

Hello

Exists any solution for Peter Waver problem (to start the FileDownloader via a context menu (from the table))?

No. There is an enhancement request (
#12008
) to add support for this.

Hello Henri,
Is there any chance to get the new feature (
#12008
) in the near future? The ticket seems not yet processed !

Any update on this? Its rather non orthogonal and frankly embarrassing to have to explain to users.

Thanks.

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.

Any pointers appreciated.

Hi everyone !!!

Any news on this one ??

Thanks…

Waiting for this one as well …