Mats Norén schrieb:
I'm trying to export a POI worksheet as a download link in my wicket page.
The link sets the responsepage to a download page in which
trying to get the outputbuffer to write to.


You can do that directly from your link, without an intermediate page. At least it works with buttons with a form, but I don't think a link makes any difference:


protected void onSubmit() {
   WebResponse r = (WebResponse)getRequestCycle().getResponse();
   r.setContentType("application/octet-stream");
   r.setHeader("Content-Disposition",
                  "attachment; filename=\"data.abc\"");
   r.write("data");
   getRequestCycle().setResponsePage((WebPage)null);
}

See wicket.examples.displaytag.export.Export for a more complete example.

This is what I am using with wicket 1.1.1.


Timo


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to