From 3c03a42d1edb0ec26110ace00f42e156cabff67b Mon Sep 17 00:00:00 2001 From: wei <> Date: Sat, 9 Dec 2006 09:17:22 +0000 Subject: Fixed #433, #384, #439, #477, #435, #422, #401, #359. Add more class docs for sqlmap. --- .../Web/UI/ActiveControls/TActivePageAdapter.php | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'framework/Web/UI/ActiveControls/TActivePageAdapter.php') diff --git a/framework/Web/UI/ActiveControls/TActivePageAdapter.php b/framework/Web/UI/ActiveControls/TActivePageAdapter.php index 2df19053..514b6880 100644 --- a/framework/Web/UI/ActiveControls/TActivePageAdapter.php +++ b/framework/Web/UI/ActiveControls/TActivePageAdapter.php @@ -45,6 +45,11 @@ class TActivePageAdapter extends TControlAdapter */ const CALLBACK_PAGESTATE_HEADER = 'X-PRADO-PAGESTATE'; + /** + * Callback redirect url header name. + */ + const CALLBACK_REDIRECT = 'X-PRADO-REDIRECT'; + /** * @var ICallbackEventHandler callback event handler. */ @@ -112,7 +117,21 @@ class TActivePageAdapter extends TControlAdapter public function renderCallbackResponse($writer) { Prado::trace("ActivePage renderCallbackResponse()",'System.Web.UI.ActiveControls.TActivePageAdapter'); - $this->renderResponse($writer); + if(($url = $this->getResponse()->getAdapter()->getRedirectedUrl())===null) + $this->renderResponse($writer); + else + $this->redirect($url); + } + + /** + * Redirect url on the client-side using javascript. + * @param string new url to load. + */ + protected function redirect($url) + { + if(!$this->getApplication()->getRequestCompleted()) + $this->getApplication()->onEndRequest(); + $this->getResponse()->appendHeader(self::CALLBACK_REDIRECT.': '.$url); } /** -- cgit v1.2.3