From 2b648e92557d804c0a628949e3264902a43013e7 Mon Sep 17 00:00:00 2001 From: xue <> Date: Wed, 21 Dec 2005 22:20:50 +0000 Subject: --- framework/Web/UI/WebControls/THead.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'framework/Web/UI') diff --git a/framework/Web/UI/WebControls/THead.php b/framework/Web/UI/WebControls/THead.php index 6da9e757..c3d111de 100644 --- a/framework/Web/UI/WebControls/THead.php +++ b/framework/Web/UI/WebControls/THead.php @@ -59,21 +59,18 @@ class THead extends TControl */ public function getTitle() { - if(($page=$this->getPage())===null) - return ''; - else - return $page->getTitle(); + return $this->getViewState('Title',''); } /** - * Sets the page title. Note, if the page is not available, the title won't be set. - * Try to use {@link TPage::setTitle} instead in this case. + * Sets the page title. + * This title will be rendered only if the {@link TPage::getTitle Title} property + * of the page is empty. * @param string the page title. */ public function setTitle($value) { - if(($page=$this->getPage())!==null) - $page->setTitle($value); + $this->setViewState('Title',$value,''); } /** @@ -103,13 +100,16 @@ class THead extends TControl */ public function render($writer) { - $writer->write("
\n