Hi,

On Tue, Oct 9, 2012 at 8:29 AM, mlabs <mlabs....@gmail.com> wrote:

> thanks Ernesto .. so using that javascript trick I now have my
> IndicatingAjaxLink downloading via the URL of my shared resource .. which
> is
> neater I think .. and so now I don't have to bother with AJAXDownload
> either.
>
> But I still have two issues:
>
> 1. the PDF opens in-place in the browser frame ... how do I get the file
> save-as dialog to pop-up?
>
> That's the part

ResourceStreamRequestHandler handler = new
ResourceStreamRequestHandler(getResourceStream(),getFileName());
                handler.setContentDisposition(ContentDisposition.ATTACHMENT);


getComponent().getRequestCycle().scheduleRequestHandlerAfterCurrent(handler);

https://cwiki.apache.org/WICKET/ajax-update-and-file-download-in-one-blow.html


> 2. The reason I'm using an ajax link is that I wanted to use the
> jquery.blockUI functionality during the download. So I copied the
> BlockUIDecorator code from Igor's wicket cookbook and added that to the
> link. But what I see is the blockUI come up for a second, then it
> unblocks..
> meanwhile the download continues (they are large PDF's) .. and eventually
> it
> shows up in-place....
>
> Maybe fixing 1) will fix this.


> So if I can figure out these two things, i'll be there...
>
> --
Regards - Ernesto Reinaldo Barreiro
Antilia Soft
http://antiliasoft.com

Reply via email to