我有一个FileResource。
但是我只看到一个空的about:blank页面,什么也没有发生...
FileResource curResource = new FileResource(new File(basepath +
"/WEB-INF/docs/"+path+".pdf"));
我希望通过点击按钮在浏览器上将此文件保存到计算机中。如何在Vaadin 7中实现?谢谢。
我尝试了类似以下的方法:
ExternalResource resource = new ExternalResource(basepath +
"/WEB-INF/icons/"+"block_16.png");
Page.getCurrent().open(resource.getURL(),"Download",true);
但是我只看到一个空的about:blank页面,什么也没有发生...