From b196ea0e2e9ab9078022e88326edecf1ba5b2f9f Mon Sep 17 00:00:00 2001 From: wei <> Date: Fri, 15 Sep 2006 23:49:56 +0000 Subject: Defer render() calls in callback event handler to a later stage. --- framework/Web/UI/ActiveControls/TCallbackClientScript.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'framework/Web/UI/ActiveControls/TCallbackClientScript.php') diff --git a/framework/Web/UI/ActiveControls/TCallbackClientScript.php b/framework/Web/UI/ActiveControls/TCallbackClientScript.php index 11f3d1ff..ebc5942f 100644 --- a/framework/Web/UI/ActiveControls/TCallbackClientScript.php +++ b/framework/Web/UI/ActiveControls/TCallbackClientScript.php @@ -152,7 +152,7 @@ class TCallbackClientScript extends TApplicationComponent */ public function raiseClientEvent($control, $eventName) { - $this->callClientFunction('Event.fireEvent', + $this->callClientFunction('Event.fireEvent', array($control, strtolower($eventName))); } @@ -382,14 +382,16 @@ class TCallbackClientScript extends TApplicationComponent /** * Renders the control and return the content boundary from * TCallbackResponseWriter. This method should only be used by framework - * component developers. + * component developers. The render() method is defered to be called in the + * TActivePageAdapter class. * @param TControl control to be rendered on callback response. * @return string the boundary for which the rendered content is wrapped. */ private function getRenderedContentBoundary($control) { $writer = $this->getResponse()->createHtmlWriter(); - $control->render($writer); + $adapter = $control->getPage()->getAdapter(); + $adapter->registerControlToRender($control, $writer); return $writer->getWriter()->getBoundary(); } -- cgit v1.2.3