summaryrefslogtreecommitdiff
path: root/framework/Web/UI
diff options
context:
space:
mode:
authorxue <>2005-11-13 04:07:15 +0000
committerxue <>2005-11-13 04:07:15 +0000
commit4efff7e33869b41ba818e2ba9e95f96e42b78797 (patch)
tree4631b1f73079e37742f54474cf07a6d537e5f2a0 /framework/Web/UI
parent0a05a81cb654745408156099f1808f565ff9312f (diff)
Modified TControl::getPage and getTemplateControl.
Diffstat (limited to 'framework/Web/UI')
-rw-r--r--framework/Web/UI/TControl.php32
1 files changed, 26 insertions, 6 deletions
diff --git a/framework/Web/UI/TControl.php b/framework/Web/UI/TControl.php
index 65993664..b0d353f3 100644
--- a/framework/Web/UI/TControl.php
+++ b/framework/Web/UI/TControl.php
@@ -199,9 +199,23 @@ class TControl extends TComponent
*/
public function getPage()
{
- if(!$this->_page && $this->_parent)
- $this->_page=$this->_parent->getPage();
- return $this->_page;
+ if($this->_page)
+ return $this->_page;
+ else
+ {
+ if($this->_parent)
+ {
+ $this->_page=$this->_parent->getPage();
+ return $this->_page;
+ }
+ else if($this->_tplControl)
+ {
+ $this->_page=$this->_tplControl->getPage();
+ return $this->_page;
+ }
+ else
+ return null;
+ }
}
/**
@@ -229,9 +243,15 @@ class TControl extends TComponent
*/
public function getTemplateControl()
{
- if(!$this->_tplControl && $this->_parent)
+ if($this->_tplControl)
+ return $this->_tplControl;
+ else if($this->_parent)
+ {
$this->_tplControl=$this->_parent->getTemplateControl();
- return $this->_tplControl;
+ return $this->_tplControl;
+ }
+ else
+ return null;
}
/**
@@ -339,7 +359,7 @@ class TControl extends TComponent
{
if($namingContainer=$this->getNamingContainer())
{
- if($this->_page===$namingContainer)
+ if($this->getPage()===$namingContainer)
return ($this->_uid=$this->_id);
else if(($prefix=$namingContainer->getUniqueID())==='')
return $this->_id;