From 95764689f7681d5905c199727dd456671f2fd1b6 Mon Sep 17 00:00:00 2001 From: xue <> Date: Fri, 17 Mar 2006 22:58:05 +0000 Subject: Cleanup of usage of registerPostBackControl. --- framework/Web/UI/WebControls/TCheckBox.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (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 f1299849..c3e5e640 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($this); + $page->getClientScript()->registerPostBackControl('Prado.WebUI.TCheckBox',$this->getPostBackOptions()); if(($accesskey=$this->getAccessKey())!=='') $writer->addAttribute('accesskey',$accesskey); @@ -364,11 +364,12 @@ class TCheckBox extends TWebControl implements IPostBackDataHandler, IValidatabl } /** - * Sets the post back options for this checkbox. + * Gets the post back options for this checkbox. * @return array */ - public function getPostBackOptions() + protected function getPostBackOptions() { + $options['ID'] = $this->getClientID(); $options['ValidationGroup'] = $this->getValidationGroup(); $options['CausesValidation'] = $this->getCausesValidation(); $options['EventTarget'] = $this->getUniqueID(); -- cgit v1.2.3