summaryrefslogtreecommitdiff
path: root/framework/Web/UI/TPage.php
diff options
context:
space:
mode:
authorxue <>2006-02-20 06:23:38 +0000
committerxue <>2006-02-20 06:23:38 +0000
commit3dcb3c4188c8d5836a2db0847d2fc43bc7e7e4d8 (patch)
tree2c3d8ec78c40f314061225b76b41a126fd5fb098 /framework/Web/UI/TPage.php
parentd830818a513a255e2ae047e7d0057238aa462f3d (diff)
Cleaned up TForm and THead.
Diffstat (limited to 'framework/Web/UI/TPage.php')
-rw-r--r--framework/Web/UI/TPage.php8
1 files changed, 3 insertions, 5 deletions
diff --git a/framework/Web/UI/TPage.php b/framework/Web/UI/TPage.php
index bbfca2fe..aa188a03 100644
--- a/framework/Web/UI/TPage.php
+++ b/framework/Web/UI/TPage.php
@@ -690,13 +690,11 @@ class TPage extends TTemplateControl
{
if($this->_focus)
{
- if(is_string($this->_focus))
- $cs->registerFocusScript($this->_focus);
- else if(($this->_focus instanceof TControl) && $this->_focus->getVisible(true))
- $cs->registerFocusScript($this->_focus->getClientID());
+ if(($this->_focus instanceof TControl) && $this->_focus->getVisible(true) || is_string($this->_focus))
+ $cs->registerFocusControl($this->_focus);
}
else if($this->_postData && ($lastFocus=$this->_postData->itemAt(self::FIELD_LASTFOCUS))!==null)
- $cs->registerFocusScript($lastFocus);
+ $cs->registerFocusControl($lastFocus);
$cs->renderHiddenFields($writer);
$cs->renderScriptFiles($writer);
$cs->renderEndScripts($writer);