diff options
author | wei <> | 2006-06-15 00:56:57 +0000 |
---|---|---|
committer | wei <> | 2006-06-15 00:56:57 +0000 |
commit | 67e09d150afe55d7a956beb299dc0534f7da68eb (patch) | |
tree | 793669c130d7cb17b56b75fb42fe1fac07c5fccc /framework/Web/UI/ActiveControls/TAutoComplete.php | |
parent | 469fe68e8a08330cb0ed8b56f758bee8d7c9445e (diff) |
Update active controls. Add comments. Add THttpResponseAdapter
Diffstat (limited to 'framework/Web/UI/ActiveControls/TAutoComplete.php')
-rw-r--r-- | framework/Web/UI/ActiveControls/TAutoComplete.php | 29 |
1 files changed, 23 insertions, 6 deletions
diff --git a/framework/Web/UI/ActiveControls/TAutoComplete.php b/framework/Web/UI/ActiveControls/TAutoComplete.php index 5a76847d..63b1d089 100644 --- a/framework/Web/UI/ActiveControls/TAutoComplete.php +++ b/framework/Web/UI/ActiveControls/TAutoComplete.php @@ -139,7 +139,7 @@ class TAutoComplete extends TActiveTextBox implements ICallbackEventHandler, INa {
$this->getSuggestions()->render($writer);
$boundary = $writer->getWriter()->getBoundary();
- $writer->getWriter()->getResponse()->setData($boundary);
+ $this->getResponse()->getAdapter()->setResponseData($boundary);
}
}
@@ -162,17 +162,34 @@ class TAutoComplete extends TActiveTextBox implements ICallbackEventHandler, INa return $options;
}
+ /**
+ * Override parent implementation, no javascript is rendered here instead
+ * the javascript required for active control is registered in {@link addAttributesToRender}.
+ */
+ protected function renderClientControlScript($writer)
+ {
+ }
+
+ /**
+ * Ensure that the ID attribute is rendered and registers the javascript code
+ * for initializing the active control.
+ */
+
public function addAttributesToRender($writer)
{
parent::addAttributesToRender($writer);
$writer->addAttribute('id',$this->getClientID());
- $this->getActiveControl()->registerCallbackClientScript($this->getAutoCompleteOptions());
+ $this->getActiveControl()->registerCallbackClientScript(
+ $this->getClientClassName(), $this->getAutoCompleteOptions());
}
-
- protected function renderClientControlScript($writer)
+
+ /**
+ * @return string corresponding javascript class name for this TActiveButton.
+ */
+ protected function getClientClassName()
{
-
- }
+ return 'Prado.WebUI.TAutoComplete';
+ }
}
/**
|