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/TImageButton.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'framework/Web/UI/WebControls/TImageButton.php') diff --git a/framework/Web/UI/WebControls/TImageButton.php b/framework/Web/UI/WebControls/TImageButton.php index f98cccb1..e5e5f3b9 100644 --- a/framework/Web/UI/WebControls/TImageButton.php +++ b/framework/Web/UI/WebControls/TImageButton.php @@ -92,7 +92,7 @@ class TImageButton extends TImage implements IPostBackDataHandler, IPostBackEven if($this->canCauseValidation()) { $writer->addAttribute('id',$this->getClientID()); - $this->getPage()->getClientScript()->registerPostBackControl($this); + $this->getPage()->getClientScript()->registerPostBackControl('Prado.WebUI.TImageButton',$this->getPostBackOptions()); } } else if($this->getEnabled()) // in this case, parent will not render 'disabled' @@ -119,8 +119,9 @@ class TImageButton extends TImage implements IPostBackDataHandler, IPostBackEven * 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['ID'] = $this->getClientID(); $options['CausesValidation'] = $this->getCausesValidation(); $options['ValidationGroup'] = $this->getValidationGroup(); -- cgit v1.2.3