Context menu action to trigger download

Is there a way to get context menu action act like link to resource?

I have a table of resources and I would like to have a context menu action ‘Download’. I was able to do it with link.

Happy new year!

Is this what you are looking for?

table.addActionHandler(new Handler() {
	@Override
	public void handleAction(Action action, Object sender, Object target) {
		getMainWindow()
				.open(
						new ExternalResource(
								"http://vaadin.com/downloading?package=release/6.2/6.2.0/vaadin-windows-6.2.0.zip"));
	}

	@Override
	public Action[] getActions(Object target, Object sender) {
		return new Action[] { new Action("download") };
	}
});

Thanks. That probably does it. I have to try it.