summaryrefslogtreecommitdiff
path: root/framework/Web/UI/WebControls/TRadioButton.php
diff options
context:
space:
mode:
authorxue <>2005-12-13 15:14:38 +0000
committerxue <>2005-12-13 15:14:38 +0000
commit1ed5d8c3f241116df31b92031ae18a2e6b5b3d4c (patch)
treea1a6b303f83294e17c4c20fb2e2b483a4e3d3d22 /framework/Web/UI/WebControls/TRadioButton.php
parent597dcf809dac8ba80bf754dc5e02f8b7ff370c8b (diff)
Moved code for registering postback js from onPreRender to addAttributesToRender. It's too early to register js in onPreRender.
Diffstat (limited to 'framework/Web/UI/WebControls/TRadioButton.php')
-rw-r--r--framework/Web/UI/WebControls/TRadioButton.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/framework/Web/UI/WebControls/TRadioButton.php b/framework/Web/UI/WebControls/TRadioButton.php
index 153da8e6..78dc6549 100644
--- a/framework/Web/UI/WebControls/TRadioButton.php
+++ b/framework/Web/UI/WebControls/TRadioButton.php
@@ -152,7 +152,16 @@ class TRadioButton extends TCheckBox
$writer->addAttribute('checked','checked');
if(!$this->getEnabled(true))
$writer->addAttribute('disabled','disabled');
+
$page=$this->getPage();
+ if($this->getAutoPostBack() && $page->getClientSupportsJavaScript())
+ {
+ $options = $this->getAutoPostBackOptions();
+ $scripts = $page->getClientScript();
+ $postback = $scripts->getPostBackEventReference($this,'',$options,false);
+ $scripts->registerClientEvent($this, "click", $postback);
+ }
+
if(($accesskey=$this->getAccessKey())!=='')
$writer->addAttribute('accesskey',$accesskey);
if(($tabindex=$this->getTabIndex())>0)