summaryrefslogtreecommitdiff
path: root/framework/Web/UI/ActiveControls/TCallbackClientScript.php
diff options
context:
space:
mode:
authorwei <>2006-06-17 01:55:05 +0000
committerwei <>2006-06-17 01:55:05 +0000
commitb3ceed048bb533a00bbea542f7c12b49c8c83d9b (patch)
tree97962fc3cb6746ae404c4f1d0095834bbb0e1ac7 /framework/Web/UI/ActiveControls/TCallbackClientScript.php
parent6c0154fb4e292ad22667e618f598a37cc5f9d524 (diff)
Update changes to active controls, add FT tests for active controls, add comments.
Diffstat (limited to 'framework/Web/UI/ActiveControls/TCallbackClientScript.php')
-rw-r--r--framework/Web/UI/ActiveControls/TCallbackClientScript.php23
1 files changed, 21 insertions, 2 deletions
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,12 +325,31 @@ 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
* component developers.