From b3ceed048bb533a00bbea542f7c12b49c8c83d9b Mon Sep 17 00:00:00 2001 From: wei <> Date: Sat, 17 Jun 2006 01:55:05 +0000 Subject: Update changes to active controls, add FT tests for active controls, add comments. --- .../UI/ActiveControls/TCallbackClientScript.php | 23 ++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 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 5d317c8a..d83bf90a 100644 --- a/framework/Web/UI/ActiveControls/TCallbackClientScript.php +++ b/framework/Web/UI/ActiveControls/TCallbackClientScript.php @@ -313,7 +313,7 @@ class TCallbackClientScript extends TApplicationComponent * @see insertBefore * @see insertAfter */ - public function replace($element, $content, $method="Element.replace", $boundary=null) + protected function replace($element, $content, $method="Element.replace", $boundary=null) { if($content instanceof TControl) { @@ -325,11 +325,30 @@ class TCallbackClientScript extends TApplicationComponent $boundary = $this->getResponseContentBoundary($content); $content = null; } - + $this->callClientFunction('Prado.Element.replace', array($element, $method, $content, $boundary)); } + /** + * Replace the content of an element with new content contained in writer. + * @param TControl|string control element or HTML element id. + * @param THtmlWriter writer for the content. + */ + public function replaceContent($element,$writer) + { + $this->replace($element, $writer); + } + + /** + * Evaluate a block of javascript enclosed in a boundary. + * @param THtmlWriter writer for the content. + */ + public function evaluateScript($writer) + { + $this->replace(null, $writer, 'Prado.Element.evaluateScript'); + } + /** * Renders the control and return the content boundary from * TCallbackResponseWriter. This method should only be used by framework -- cgit v1.2.3