summaryrefslogtreecommitdiff
path: root/framework/Web/UI/WebControls/TLinkButton.php
diff options
context:
space:
mode:
authorwei <>2006-05-06 02:26:20 +0000
committerwei <>2006-05-06 02:26:20 +0000
commita7f6c6640ac9295eec3ae2edbb2250179eb85e33 (patch)
tree8a3879c747dfc3bcd5d65f334341ea7c81ced268 /framework/Web/UI/WebControls/TLinkButton.php
parent46155621cbf97191fca495cbd09a2eedd82afa82 (diff)
Adding TActiveButton and TActiveTextBox
Diffstat (limited to 'framework/Web/UI/WebControls/TLinkButton.php')
-rw-r--r--framework/Web/UI/WebControls/TLinkButton.php19
1 files changed, 13 insertions, 6 deletions
diff --git a/framework/Web/UI/WebControls/TLinkButton.php b/framework/Web/UI/WebControls/TLinkButton.php
index bca4a8f6..7f9baab8 100644
--- a/framework/Web/UI/WebControls/TLinkButton.php
+++ b/framework/Web/UI/WebControls/TLinkButton.php
@@ -81,15 +81,22 @@ class TLinkButton extends TWebControl implements IPostBackEventHandler, IButtonC
parent::addAttributesToRender($writer);
if($this->getEnabled(true))
- {
- //create unique no-op url references
- $nop = "#".$this->getClientID();
- $writer->addAttribute('href', $nop);
- $this->getPage()->getClientScript()->registerPostBackControl('Prado.WebUI.TLinkButton',$this->getPostBackOptions());
- }
+ $this->renderClientControlScript($writer);
else if($this->getEnabled()) // in this case, parent will not render 'disabled'
$writer->addAttribute('disabled','disabled');
}
+
+ /**
+ * Renders the client-script code.
+ */
+ protected function renderClientControlScript($writer)
+ {
+ //create unique no-op url references
+ $nop = "#".$this->getClientID();
+ $writer->addAttribute('href', $nop);
+ $cs = $this->getPage()->getClientScript();
+ $cs->registerPostBackControl(get_class($this),$this->getPostBackOptions());
+ }
/**
* Returns postback specifications for the button.