Hi,
I want to be able to generate the byteArray (for MS - Excel report being
passed to a byteArrayResource every time the resource link is clicked. I was
trying to use getCacheDuration( ) for the same to allow for it to create
ByteArray every time the resource link is clicked on the page.
I have something like :
final ByteArrayResource modelReportByteArrayResource = new
ByteArrayResource(CONTENT_TYPE, createByteArray() ,FILE_NAME) {
// java docs removed for clarity
protected final int getCacheDuration() {
return -1; // -1 or 0 doesn't work. =(
}
};
// add the resource.
add(new ResourceLink(modelReportResource ));
I tried to override :
// java docs removed for clarity
protected final void setHeaders(final WebResponse response) {
response.setHeader("Cache-Control", "no-cache,
must-revalidate");
}
But I still get the same excel report over and over no matter how many times
i click the link, despite me changing some data or the stream.
Any suggestions / thoughts???
Regards
Vyas, Anirudh