summaryrefslogtreecommitdiff
path: root/framework/Web/UI/TPage.php
diff options
context:
space:
mode:
authorxue <>2006-04-08 17:00:05 +0000
committerxue <>2006-04-08 17:00:05 +0000
commitccf0cd0f8d6480238db531f46ae1c70554d0e90d (patch)
tree42dad36e6d3c3ee2e9affa71615257f848cff552 /framework/Web/UI/TPage.php
parent325b2ab61e3cf03e9ae7fb03ee1030cae6b08b3e (diff)
Added TOutputCache.
Diffstat (limited to 'framework/Web/UI/TPage.php')
-rw-r--r--framework/Web/UI/TPage.php26
1 files changed, 22 insertions, 4 deletions
diff --git a/framework/Web/UI/TPage.php b/framework/Web/UI/TPage.php
index b68c4996..7f4c490c 100644
--- a/framework/Web/UI/TPage.php
+++ b/framework/Web/UI/TPage.php
@@ -141,6 +141,10 @@ class TPage extends TTemplateControl
* @var mixed page state persister
*/
private $_statePersister=null;
+ /**
+ * @var TStack stack used to store currently active caching controls
+ */
+ private $_cachingStack=null;
/**
* Constructor.
@@ -599,9 +603,13 @@ class TPage extends TTemplateControl
* if not checked, will not have a post value.
* @param TControl control registered for loading post data
*/
- public function registerRequiresPostData(TControl $control)
+ public function registerRequiresPostData($control)
{
- $this->_controlsRegisteredForPostData[$control->getUniqueID()]=true;
+ $id=is_string($control)?$control:$control->getUniqueID();
+ $this->_controlsRegisteredForPostData[$id]=true;
+ $params=func_get_args();
+ foreach($this->getCachingStack() as $item)
+ $item->registerAction('registerRequiresPostData',$id);
}
/**
@@ -747,8 +755,11 @@ class TPage extends TTemplateControl
{
if($this->_focus)
{
- if(($this->_focus instanceof TControl) && $this->_focus->getVisible(true) || is_string($this->_focus))
- $cs->registerFocusControl($this->_focus);
+ if(($this->_focus instanceof TControl) && $this->_focus->getVisible(true))
+ $focus=$this->_focus->getClientID();
+ else
+ $focus=$this->_focus;
+ $cs->registerFocusControl($focus);
}
else if($this->_postData && ($lastFocus=$this->_postData->itemAt(self::FIELD_LASTFOCUS))!==null)
$cs->registerFocusControl($lastFocus);
@@ -908,6 +919,13 @@ class TPage extends TTemplateControl
{
$this->_pagePath=$value;
}
+
+ public function getCachingStack()
+ {
+ if(!$this->_cachingStack)
+ $this->_cachingStack=new TStack;
+ return $this->_cachingStack;
+ }
}
/**