diff options
author | Christophe.Boulain <> | 2009-04-29 06:22:27 +0000 |
---|---|---|
committer | Christophe.Boulain <> | 2009-04-29 06:22:27 +0000 |
commit | 28a78f7306d1952a5efb4b8b8a6432f41bf5f4cf (patch) | |
tree | c9ebef1717a2809f7dbe7eb6fcb84c0f84dabda9 /framework/Web/UI/ActiveControls/TActivePanel.php | |
parent | f3c0f40446077b91440cb67a3442b23f2d2036b4 (diff) |
Ensure rendering of clientID in TActivePanel
Diffstat (limited to 'framework/Web/UI/ActiveControls/TActivePanel.php')
-rw-r--r-- | framework/Web/UI/ActiveControls/TActivePanel.php | 31 |
1 files changed, 20 insertions, 11 deletions
diff --git a/framework/Web/UI/ActiveControls/TActivePanel.php b/framework/Web/UI/ActiveControls/TActivePanel.php index 51e9fb08..25a42eb7 100644 --- a/framework/Web/UI/ActiveControls/TActivePanel.php +++ b/framework/Web/UI/ActiveControls/TActivePanel.php @@ -4,7 +4,7 @@ *
* @author Wei Zhuo <weizhuo[at]gamil[dot]com>
* @link http://www.pradosoft.com/
- * @copyright Copyright © 2005-2008 PradoSoft + * @copyright Copyright © 2005-2008 PradoSoft
* @license http://www.pradosoft.com/license/
* @version $Id$
* @package System.Web.UI.ActiveControls
@@ -58,6 +58,15 @@ class TActivePanel extends TPanel implements IActiveControl }
/**
+ * Adds attribute id to the renderer.
+ * @param THtmlWriter the writer used for the rendering purpose
+ */
+ protected function addAttributesToRender($writer) {
+ $writer->addAttribute('id',$this->getClientID());
+ parent::addAttributesToRender($writer);
+ }
+
+ /**
* Renders and replaces the panel's content on the client-side.
* When render() is called before the OnPreRender event, such as when render()
* is called during a callback event handler, the rendering
@@ -74,16 +83,16 @@ class TActivePanel extends TPanel implements IActiveControl }
else
{
- $this->getPage()->getAdapter()->registerControlToRender($this,$writer); - if ($this->getHasControls()) - { - // If we update a TActivePanel on callback, - // We shouldn't update all childs, because the whole content will be replaced by - // the parent - foreach ($this->findControlsByType('IActiveControl', false) as $control) - { - $control->getActiveControl()->setEnableUpdate(false); - } + $this->getPage()->getAdapter()->registerControlToRender($this,$writer);
+ if ($this->getHasControls())
+ {
+ // If we update a TActivePanel on callback,
+ // We shouldn't update all childs, because the whole content will be replaced by
+ // the parent
+ foreach ($this->findControlsByType('IActiveControl', false) as $control)
+ {
+ $control->getActiveControl()->setEnableUpdate(false);
+ }
}
}
}
|