Hi Angel, thanks for the reply.
But it looks like this is not making it non-cacheable. It is cacheable, I
get the Excel prompt about reading the local file.
My new code with your suggestion:
----------------------------------
WebResource export = new WebResource()
{
@Override
public IResourceStream getResourceStream() {
ByteArrayResource bar = new
ByteArrayResource("application/vnd.ms-excel",
createExcelBytes());
return bar.getResourceStream();
}
@Override
protected void setHeaders(WebResponse response) {
super.setHeaders(response);
response.setAttachmentHeader("report.xls");
*response.setHeader("Cache-Control", "private"); *
}
};
// COMMENTED OUT setCacheable(false)
//export.setCacheable(false);
ResourceLink exportLink = new ResourceLink("exportLink", export);
--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/Problem-with-setCacheable-false-No-Cache-Header-in-WebResource-tp3765955p3768583.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]