Hi Yung-Luen,

have a look on the following method : disableClientCaching ---> Class WOResponse http://developer.apple.com/documentation/DeveloperTools/Reference/ WO541Reference/com/webobjects/appserver/ WOResponse.html#disableClientCaching()

You can override appendToResponse in your CSVReport page and invoke disableClientCaching,
        something like :

public void appendToResponse(WOResponse aResponse, WOContext aContext) { aResponse.setHeader("application/vnd.ms-excel", "Content- Type");
        super.appendToResponse(aResponse, aContext);
        aResponse.disableClientCaching();
    }

About HTTP headers : http://www.w3.org/Protocols/rfc2616/rfc2616- sec14.html

If your trouble still persist , particularly with browser like IE, perhaps you could try to add a query string with time and milliseconds, on the client-side. But as usual , less you do with JavaScript, better you are ...

        Did you know Yslow FireFox Add-ons ?
        http://developer.yahoo.com/yslow/help/
    https://addons.mozilla.org/en-US/firefox/addon/5369

        HTH,
        Stephane

        
Le 13 sept. 08 à 21:24, Yung-Luen Lan a écrit :


Hi folks,

I have a page with a list of data entry using ERXDisplayGroup and a
"Download Report" link which returns a csv-formatted detail of
selected entries.

The link bound to an action looked like:

public WOComponent generateReportFile() {
    CSVReport n = pageWithName(CSVReport.class);
    n.setDataEntries(selectedEntriesArray());
    return n;
}

When user clicked a data entry in the list, I'll toggle it in
selectedEntriesArray using Ajax framework in Wonder.

When the first time user selects some entries and download the report
file, it's fine.

However, no matter how the user modify the selection set after the
first download, they can only get files with the same content as the
first downloaded one.

After investigate this problem, I find that the generateReportFile()
action were called only once at the first click of my link. Seems that
WO cached the component and return it without invoke my action because
those requests are identical. (I use Ajax so there's no whole page
refresh, I guess this is the reason why I change the selection set but
still got identical requests.)

Is there any way to avoid WO cache my component without invoke my action?

Regards,
yllan
 _______________________________________________
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/ stephane.guyot11%40wanadoo.fr

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/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to