|
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
On 29/01/2009, at 4:08 AM, Chuck Hill wrote:
Score WebObjects: 1, Chuck: 0
Score Paul: 0, because...
The defect is mine. The correct code is:
if (AjaxUtils.isAjaxRequest(aContext.request())) { // Create redirect to return to break out of Ajax AjaxUtils.redirectTo(errorPage); WOResponse redirect = errorPage.context().response();
// Generate the error page so that it gets into the page cache, don't do this earlier!
errorPage.generateResponse();
return redirect;
}
Or
if (AjaxUtils.isAjaxRequest(aContext.request())) { // Create redirect to return to break out of Ajax AjaxUtils.redirectTo(errorPage); WOResponse redirect = errorPage.context().response();
// Force errorPage into the page cache, don't do this earlier! aContext.session().savePage(errorPage); return redirect; }
-- Paul.
w http://logicsquad.net/ h http://paul.hoadley.name/
_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
| Home | Archives | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2011 Apple Inc. All rights reserved.