diff options
author | xue <> | 2006-08-09 12:42:06 +0000 |
---|---|---|
committer | xue <> | 2006-08-09 12:42:06 +0000 |
commit | 2151151bb43f5c4151d293da8fe4d1806e8842b4 (patch) | |
tree | 39466ee3a94a474033ce476444419a4446e6ae2b /framework | |
parent | 7012130a7c98d602f3408d04c620a69055607781 (diff) |
Added error information when content control doesn't specify a master control.
Diffstat (limited to 'framework')
-rw-r--r-- | framework/Exceptions/messages.txt | 1 | ||||
-rw-r--r-- | framework/Web/UI/TTemplateControl.php | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/framework/Exceptions/messages.txt b/framework/Exceptions/messages.txt index 90872e2f..cbb7cf04 100644 --- a/framework/Exceptions/messages.txt +++ b/framework/Exceptions/messages.txt @@ -164,6 +164,7 @@ control_stylesheet_applied = StyleSheet skin has already been applied to {0}. control_id_nonunique = {0}.ID '{1}' is not unique among all controls under the same naming container.
templatecontrol_mastercontrol_invalid = Master control must be of type TTemplateControl or a child class.
+templatecontrol_mastercontrol_required = Control '{0}' requires a master control since the control uses TContent.
templatecontrol_contentid_duplicated = TContent ID '{0}' is duplicated.
templatecontrol_placeholderid_duplicated= TContentPlaceHolder ID '{0}' is duplicated.
templatecontrol_directive_invalid = {0}.{1} can only accept a static text string through a template directive.
diff --git a/framework/Web/UI/TTemplateControl.php b/framework/Web/UI/TTemplateControl.php index 3bbe52c5..7d1f2d7e 100644 --- a/framework/Web/UI/TTemplateControl.php +++ b/framework/Web/UI/TTemplateControl.php @@ -235,6 +235,8 @@ class TTemplateControl extends TCompositeControl foreach($this->_contents as $id=>$content)
$master->injectContent($id,$content);
}
+ else if(!empty($this->_contents))
+ throw new TConfigurationException('templatecontrol_mastercontrol_required',get_class($this));
parent::initRecursive($namingContainer);
}
}
|