Hi,
are you sure proposedFileName is non-null?
Sven
On 08/23/2011 07:29 PM, Igor Racic wrote:
> Hi,
>
> I am not able to get save dialog.
>
> Here is the code:
>
> final AJAXDownload download = new AJAXDownload()
> {
> @Override
> protected IResourceStream getResourceStream()
> {
> return new StringResourceStream(info.srcString, "text/plain");
> }
> @Override
> protected String getFileName() {
> return info.proposedFileName;
> }
> };
> add(download);
>
> add(new AjaxLink<Void>("download") {
> @Override
> public void onClick(AjaxRequestTarget target)
> {
> // do whatever with the target, e.g. refresh components
> //target.addComponent(...);
>
> // finally initiate the download
> download.initiate(target);
> }
> });
>
> Any hint to troubleshoot the problem ? (Clicking on link goes directly to
> download)
> Version is 1.4.17
>
>
> Thank you and regards,
> Igor
>
>
>
>
> 2011/8/22 eugenebalt <[email protected]>
>
>> Thanks I fixed it. This example explains how to do it.
>>
>> https://cwiki.apache.org/WICKET/best-practices-and-gotchas.html
>>
>>
>>
>> --
>> View this message in context:
>> http://apache-wicket.1842946.n4.nabble.com/AJAXDownload-Example-Doesn-t-Support-Content-Disposition-Save-As-tp3760342p3760552.html
>> Sent from the Users forum mailing list archive at Nabble.com.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]