Take a look at CachedLazyResource I posted here:
http://sourceforge.net/tracker/index.php?func=detail&aid=1431567&group_id=119783&atid=684977
It works excellent for cached dynamic images.
Gili
Anders Peterson wrote:
1) "setCacheable": Done! With dynamic images it seems like a good idea
to have this set to false by default.
2) "random number as a query parameter": I had thought about giving the
images different names with each request, but I didn't know (still
don't) how to do that. The generated html looks like this:
<tr><td scope="col"><img width="600" height="300" wicket:id="image2"
src="/BLApp/app?path=3:image2&interface=IResourceListener"/></td></tr>
I'll look for documentation on how to do this...
3) "Set the headers on the response": You mean some header that tells
the browser(s) not to cache the page - is there a standard for that? I
have no idea which browsers will be used, and I want the app to work
with any browser.
Thanks, /Anders
Anders Peterson wrote:
Hi,
On one page I'm displaying dynamic charts (JFreeChart) as images. The
charts, the data they're based on, are constantly changed by the users.
The problem (as I understand it): The web browser doesn't know that
the image has changed and therefore (sometimes) uses a cached image.
Which means incorrect data is displayed.
How can I make sure the browser always asks for a fresh image?
/Anders
Image tmpImage2 = new Image("image2", new SpclChartResource() {
public AbstractChartFactory getFactory() {
this.setHeight(300);
this.setWidth(600);
DefaultCategoryDatasetFactory retVal = new
DefaultCategoryDatasetFactory();
retVal.setLegend(true);
retVal.setType(AbstractChartFactory.TYPE_BarChart);
...
--
http://www.desktopbeautifier.com/
-------------------------------------------------------
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