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/TButton.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'framework/Web/UI/WebControls/TButton.php') diff --git a/framework/Web/UI/WebControls/TButton.php b/framework/Web/UI/WebControls/TButton.php index 2ced3098..6751687c 100644 --- a/framework/Web/UI/WebControls/TButton.php +++ b/framework/Web/UI/WebControls/TButton.php @@ -77,7 +77,7 @@ class TButton extends TWebControl implements IPostBackEventHandler if($this->canCauseValidation()) { $writer->addAttribute('id',$this->getClientID()); - $this->getPage()->getClientScript()->registerPostBackControl($this); + $this->getPage()->getClientScript()->registerPostBackControl('Prado.WebUI.TButton',$this->getPostBackOptions()); } } else if($this->getEnabled()) // in this case, parent will not render 'disabled' @@ -105,10 +105,11 @@ class TButton extends TWebControl implements IPostBackEventHandler * This method is used by framework and control developers. * @return array parameters about how the button defines its postback behavior. */ - public function getPostBackOptions() + protected function getPostBackOptions() { - $options['CausesValidation'] = $this->getCausesValidation(); - $options['ValidationGroup'] = $this->getValidationGroup(); + $options['ID']=$this->getClientID(); + $options['CausesValidation']=$this->getCausesValidation(); + $options['ValidationGroup']=$this->getValidationGroup(); return $options; } -- cgit v1.2.3