From a7f6c6640ac9295eec3ae2edbb2250179eb85e33 Mon Sep 17 00:00:00 2001 From: wei <> Date: Sat, 6 May 2006 02:26:20 +0000 Subject: Adding TActiveButton and TActiveTextBox --- framework/Web/UI/WebControls/TCheckBox.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'framework/Web/UI/WebControls/TCheckBox.php') diff --git a/framework/Web/UI/WebControls/TCheckBox.php b/framework/Web/UI/WebControls/TCheckBox.php index da389948..cb8fb30d 100644 --- a/framework/Web/UI/WebControls/TCheckBox.php +++ b/framework/Web/UI/WebControls/TCheckBox.php @@ -351,7 +351,7 @@ class TCheckBox extends TWebControl implements IPostBackDataHandler, IValidatabl $page=$this->getPage(); if($this->getEnabled(true) && $this->getAutoPostBack() && $page->getClientSupportsJavaScript()) - $page->getClientScript()->registerPostBackControl('Prado.WebUI.TCheckBox',$this->getPostBackOptions()); + $this->renderClientControlScript($writer); if(($accesskey=$this->getAccessKey())!=='') $writer->addAttribute('accesskey',$accesskey); @@ -363,6 +363,15 @@ class TCheckBox extends TWebControl implements IPostBackDataHandler, IValidatabl $writer->renderEndTag(); } + /** + * Renders the client-script code. + */ + protected function renderClientControlScript($writer) + { + $cs = $this->getPage()->getClientScript(); + $cs->registerPostBackControl(get_class($this),$this->getPostBackOptions()); + } + /** * Gets the post back options for this checkbox. * @return array -- cgit v1.2.3