Updated 
http://cwiki.apache.org/confluence/display/WICKET/AJAX+update+and+file+download+in+one+blow

Mit freundlichen Grüßen
Christian Giambalvo
--
Fachinformatiker für Anwendungsentwicklung

EXCELSIS Informationssysteme GmbH
Wilhelmsplatz 8 - 70182 Stuttgart
Mobile +49 176 196 32 406
Office +49 711 6 20 30 406
christian.giamba...@excelsisnet.com
www.excelsisnet.com
www.twitter.com/excelsis_info

Sitz Stuttgart
Amtsgericht Stuttgart, HRB 21104
Geschäftsführer: Christian Sauter, Dr. Nils Herda, Frank Wolf


-----Ursprüngliche Nachricht-----
Von: Ernesto Reinaldo Barreiro [mailto:reier...@gmail.com] 
Gesendet: Mittwoch, 21. Oktober 2009 09:40
An: users@wicket.apache.org
Betreff: Re: file download using ajaxLink

Maybe this might help
http://cwiki.apache.org/WICKET/ajax-update-and-file-download-in-one-blow.html

<http://cwiki.apache.org/WICKET/ajax-update-and-file-download-in-one-blow.html>
Ernesto

On Tue, Oct 20, 2009 at 10:12 PM, tubin gen <fachh...@gmail.com> wrote:

> I do download in traditional way
>
> here is the code
>
>    public void download(String filename, byte[] filedata){
>        setRedirect(false);
>        WebResponse response = (WebResponse) getResponse();
>        response.setAttachmentHeader(filename);
>        response.setLastModifiedTime(Time.now());
>        response.setContentType("application/octet-stream");
>        response.write(
>                new ByteArrayInputStream(filedata));
>        response.close();
>    }
>
>
>                            item.add(new Link<Void>("download"){
>                                {
>                                    add(new Label("filename",
> eaAuditProgramAttachment.getFileName()));
>                                }
>                                @Override
>                                public void onClick() {
>
> ((BasePage)getPage()).download(eaAuditProgramAttachment.getFileName(),
> eaAuditProgramAttachment.getEaBlob().getBlobData());
>                                }
>                            });
>
>
> If I replace this link with AjaxLink it will not work  and I must use  an
> ajaxlink    please tell me how can I use ajaxLink for download
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to