On Aug 15, 2007, at 9:02 PM, Jacob Mouka wrote:

I vaguely remember running into this. I can't test it (no IE access at the moment) but my old component has a name bound to the WOImage's key attribute. I used a random number (eg 123.png) so that the cache would be refreshed when the image gets updated. Chuck's suggestion might work too, but if it doesn't, give this a try. If I understand it correctly, if you don't bind the key attribute then the image has to be re-fetched each time the page loads, and I guess IE goes back to the source instead of looking in its cache for printing.

A caution on this.  See the docs for WOResourceManager.setData:

By default when a dynamic element requests an image from the database, or builds a graph on the fly, it tells the resource manager to store its data in a cache, using either a developer- specified key, or a random key. In return the dynamic element inserts a special url in the HTML so that the browser, on callback, can retrieve the data out of the resource manager cache and display it. If the key was specified by the component, the data stays in the cache as long as the cache is not flushed. If the key was randomly generated by the resource manager, the data is removed from the cache (using removeDataForKey), as soon as the browser retrieves it.
I read this as meaning that if you specify a key, you are responsible for removing it from the cache (which I suspect is not easy to do at the right time). If you don't do this you run the risk of running out of memory.

Chuck





On 14-Aug-07, at 11:39 AM, Chuck Hill wrote:


On Aug 14, 2007, at 7:35 AM, Frederic JECKER wrote:

Hi list,

I'm using a WOImage to print charts generated by JFreeChart.
This works fine and the generated charts are displayed on the browsers. Now when I try to print my page with IE (this works well) the generated pictures are not printed. I googled for a while without success, I just found some posts mentionning cache/content-type issues : if they are not set correctly IE performs a refresh of the picture before printing (which is the cause of my problem) I checked my page for a pragma no-cache in the header and set a correct mime time in the WOImage bindings without success.

Anyone could help me with this issue ?

Here is one way.  This goes in Application.java


// Revert to 4.5 behaviour. Having this enabled prevents IE from displaying content that cannot // be displayed inline in the browswer (pdf files, for example). This was a known bug in IE 4.0 // and is reported fixed by MS: http:// support.microsoft.com/support/kb/articles/Q231/2/96.ASP?LN=EN- US&SD=gn&FR=0&qry=Internet%20Explorer%20cannot% 20download&rnk=19&src=DHCS_MSPSS_gn_SRCH&SPR=IE // "When you try to download a .pdf file from a Web site that uses the Hypertext Transfer Protocol // (HTTP) "Cache-Control = 'no-cache'" directive, Internet Explorer may generate the following // error message: Internet Explorer cannot down load from the Internet site File_name from
        // Computer_name.".
        setPageRefreshOnBacktrackEnabled(false);


Chuck

--

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects





_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/jmouka% 40gmail.com

This email sent to [EMAIL PROTECTED]

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/chill% 40global-village.net

This email sent to [EMAIL PROTECTED]


--

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects





_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to