summaryrefslogtreecommitdiff
path: root/framework/Web/UI/ActiveControls/TActivePanel.php
diff options
context:
space:
mode:
authorwei <>2006-09-15 23:49:56 +0000
committerwei <>2006-09-15 23:49:56 +0000
commitb196ea0e2e9ab9078022e88326edecf1ba5b2f9f (patch)
tree3d9f37bfa14c363fc91df306b798ddc1b7ef872e /framework/Web/UI/ActiveControls/TActivePanel.php
parent9f2905f5e2a6d0ab33e4e2d82162183cfd63a042 (diff)
Defer render() calls in callback event handler to a later stage.
Diffstat (limited to 'framework/Web/UI/ActiveControls/TActivePanel.php')
-rw-r--r--framework/Web/UI/ActiveControls/TActivePanel.php16
1 files changed, 13 insertions, 3 deletions
diff --git a/framework/Web/UI/ActiveControls/TActivePanel.php b/framework/Web/UI/ActiveControls/TActivePanel.php
index 44f570b3..6f5c87dd 100644
--- a/framework/Web/UI/ActiveControls/TActivePanel.php
+++ b/framework/Web/UI/ActiveControls/TActivePanel.php
@@ -59,13 +59,23 @@ class TActivePanel extends TPanel implements IActiveControl
/**
* 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
+ * is defered until OnPreRender event is raised.
* @param THtmlWriter html writer
*/
public function render($writer)
{
- parent::render($writer);
- if($this->getActiveControl()->canUpdateClientSide())
- $this->getPage()->getCallbackClient()->replaceContent($this,$writer);
+ if($this->getHasPreRendered())
+ {
+ parent::render($writer);
+ if($this->getActiveControl()->canUpdateClientSide())
+ $this->getPage()->getCallbackClient()->replaceContent($this,$writer);
+ }
+ else
+ {
+ $this->getPage()->getAdapter()->registerControlToRender($this,$writer);
+ }
}
}