View Full Version : Download link to a file with Button

3 May 2012, 11:00 AM
Hi I want to make a button which will start downloading a file when user clicks on it. How it is possible?

8 May 2012, 6:49 AM
it is so easy:

Button button = new Button( "Download" );
button.addSelectionListener( new SelectionListener<ButtonEvent>() {

public void componentSelected( ButtonEvent ce)
Window.open( url, "_blank", null );
} );