summaryrefslogtreecommitdiff
path: root/framework/Web/UI
diff options
context:
space:
mode:
authorChristophe.Boulain <>2009-04-29 06:22:27 +0000
committerChristophe.Boulain <>2009-04-29 06:22:27 +0000
commit28a78f7306d1952a5efb4b8b8a6432f41bf5f4cf (patch)
treec9ebef1717a2809f7dbe7eb6fcb84c0f84dabda9 /framework/Web/UI
parentf3c0f40446077b91440cb67a3442b23f2d2036b4 (diff)
Ensure rendering of clientID in TActivePanel
Diffstat (limited to 'framework/Web/UI')
-rw-r--r--framework/Web/UI/ActiveControls/TActivePanel.php31
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 &copy; 2005-2008 PradoSoft
+ * @copyright Copyright &copy; 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);
+ }
}
}
}