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/TLinkButton.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'framework/Web/UI/WebControls/TLinkButton.php') diff --git a/framework/Web/UI/WebControls/TLinkButton.php b/framework/Web/UI/WebControls/TLinkButton.php index f1ed95f8..95490f8d 100644 --- a/framework/Web/UI/WebControls/TLinkButton.php +++ b/framework/Web/UI/WebControls/TLinkButton.php @@ -85,7 +85,7 @@ class TLinkButton extends TWebControl implements IPostBackEventHandler //create unique no-op url references $nop = "#".$this->getClientID(); $writer->addAttribute('href', $nop); - $this->getPage()->getClientScript()->registerPostBackControl($this); + $this->getPage()->getClientScript()->registerPostBackControl('Prado.WebUI.TLinkButton',$this->getPostBackOptions()); } else if($this->getEnabled()) // in this case, parent will not render 'disabled' $writer->addAttribute('disabled','disabled'); @@ -94,10 +94,11 @@ class TLinkButton extends TWebControl implements IPostBackEventHandler /** * Returns postback specifications for the button. * This method is used by framework and control developers. - * @return TPostBackOptions parameters about how the button defines its postback behavior. + * @return array parameters about how the button defines its postback behavior. */ - public function getPostBackOptions() + protected function getPostBackOptions() { + $options['ID'] = $this->getClientID(); $options['EventTarget'] = $this->getUniqueID(); $options['CausesValidation'] = $this->getCausesValidation(); $options['ValidationGroup'] = $this->getValidationGroup(); -- cgit v1.2.3