diff options
author | wei <> | 2006-09-15 23:49:56 +0000 |
---|---|---|
committer | wei <> | 2006-09-15 23:49:56 +0000 |
commit | b196ea0e2e9ab9078022e88326edecf1ba5b2f9f (patch) | |
tree | 3d9f37bfa14c363fc91df306b798ddc1b7ef872e /framework/Web/UI/ActiveControls/TCallbackClientScript.php | |
parent | 9f2905f5e2a6d0ab33e4e2d82162183cfd63a042 (diff) |
Defer render() calls in callback event handler to a later stage.
Diffstat (limited to 'framework/Web/UI/ActiveControls/TCallbackClientScript.php')
-rw-r--r-- | framework/Web/UI/ActiveControls/TCallbackClientScript.php | 8 |
1 files changed, 5 insertions, 3 deletions
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();
}
|