summaryrefslogtreecommitdiff
path: root/framework/Web/UI/WebControls
diff options
context:
space:
mode:
authorxue <>2005-12-10 02:02:10 +0000
committerxue <>2005-12-10 02:02:10 +0000
commit1f1f96b7e143973e7da69fc01ebd6721f62e291c (patch)
tree342915f87c904d8a79a853101ad9d176051a588b /framework/Web/UI/WebControls
parent662547dc4c6c493c1c89f888e3ef73667ea783c4 (diff)
Diffstat (limited to 'framework/Web/UI/WebControls')
-rw-r--r--framework/Web/UI/WebControls/TContent.php2
-rw-r--r--framework/Web/UI/WebControls/TContentPlaceHolder.php5
2 files changed, 6 insertions, 1 deletions
diff --git a/framework/Web/UI/WebControls/TContent.php b/framework/Web/UI/WebControls/TContent.php
index 20cd1dc5..d02d3b4d 100644
--- a/framework/Web/UI/WebControls/TContent.php
+++ b/framework/Web/UI/WebControls/TContent.php
@@ -39,6 +39,8 @@ class TContent extends TControl implements INamingContainer
*/
public function createdOnTemplate($parent)
{
+ if(($id=$this->getID())==='')
+ throw new TConfigurationException('content_id_required');
$this->getTemplateControl()->registerContent($this);
parent::createdOnTemplate($parent);
}
diff --git a/framework/Web/UI/WebControls/TContentPlaceHolder.php b/framework/Web/UI/WebControls/TContentPlaceHolder.php
index 32106e82..a13e85bc 100644
--- a/framework/Web/UI/WebControls/TContentPlaceHolder.php
+++ b/framework/Web/UI/WebControls/TContentPlaceHolder.php
@@ -39,8 +39,11 @@ class TContentPlaceHolder extends TControl
*/
public function createdOnTemplate($parent)
{
+ if(($id=$this->getID())==='')
+ throw new TConfigurationException('contentplaceholder_id_required');
$loc=$parent->getHasControls()?$parent->getControls()->getCount():0;
- $this->getTemplateControl()->registerContentPlaceHolder($this->getID(),$parent,$loc);
+ $this->getTemplateControl()->registerContentPlaceHolder($id,$parent,$loc);
+ $parent->unregisterObject($id);
}
}