summaryrefslogtreecommitdiff
path: root/framework/Web/UI/ActiveControls/TActivePageAdapter.php
diff options
context:
space:
mode:
authorwei <>2006-05-05 06:58:04 +0000
committerwei <>2006-05-05 06:58:04 +0000
commit47d05516b1d1c465217c59732bf8442ab0cfd497 (patch)
treec8c8fce4eb2c4ca9580b87a7c410fb7606ce1af4 /framework/Web/UI/ActiveControls/TActivePageAdapter.php
parentf21d3433721308f5d0693f44bbfed56f7b2ecc2d (diff)
Added prioritize callback and enabled viewstate update on callback return.
Diffstat (limited to 'framework/Web/UI/ActiveControls/TActivePageAdapter.php')
-rw-r--r--framework/Web/UI/ActiveControls/TActivePageAdapter.php15
1 files changed, 12 insertions, 3 deletions
diff --git a/framework/Web/UI/ActiveControls/TActivePageAdapter.php b/framework/Web/UI/ActiveControls/TActivePageAdapter.php
index db783a12..67720afd 100644
--- a/framework/Web/UI/ActiveControls/TActivePageAdapter.php
+++ b/framework/Web/UI/ActiveControls/TActivePageAdapter.php
@@ -25,6 +25,7 @@ class TActivePageAdapter extends TControlAdapter
const CALLBACK_DATA_HEADER = 'X-PRADO-DATA';
const CALLBACK_ACTION_HEADER = 'X-PRADO-ACTIONS';
const CALLBACK_ERROR_HEADER = 'X-PRADO-ERROR';
+ const CALLBACK_PAGESTATE_HEADER = 'X-PRADO-PAGESTATE';
/**
* @var ICallbackEventHandler callback event handler.
@@ -80,7 +81,7 @@ class TActivePageAdapter extends TControlAdapter
/**
* Renders the callback response by adding additional callback data and
- * javascript actions in the header.
+ * javascript actions in the header and page state if required.
*/
protected function renderResponse($writer)
{
@@ -92,7 +93,15 @@ class TActivePageAdapter extends TControlAdapter
{
$data = TJavascript::jsonEncode($this->_result->getData());
$response->appendHeader(self::CALLBACK_DATA_HEADER.': '.$data);
- }
+ }
+ if(($handler = $this->getCallbackEventTarget()) !== null)
+ {
+ if($handler->getClientSide()->getEnablePageStateUpdate())
+ {
+ $pagestate = $this->getPage()->getClientState();
+ $response->appendHeader(self::CALLBACK_PAGESTATE_HEADER.': '.$pagestate);
+ }
+ }
}
/**
@@ -329,4 +338,4 @@ class TInvalidCallbackRequestException extends TException
{
}
-?>
+?> \ No newline at end of file