public void initiate ( final AjaxRequestTarget target ) { String url = getCallbackUrl ( ) . toString ( ) ; if ( antiCache ) { url = url + ( url . contains ( "?" ) ? "&" : "?" ) ; url = url + "antiCache=" + System . currentTimeMillis ( ) ; } // the timeout is needed to let Wicket release the channel target . appendJavaScript ( "setTimeout(\"window.location.href='" + url + "'\", 100);" ) ; }
Call this method to initiate the download .