summaryrefslogtreecommitdiff
path: root/framework/Web/UI/WebControls/TLinkButton.php
diff options
context:
space:
mode:
authorwei <>2006-08-12 05:34:54 +0000
committerwei <>2006-08-12 05:34:54 +0000
commit54d4919e3f1b00b644fa3c107acdf20159a1b154 (patch)
tree1c3e9cc679d4e08cc4beb06eee6f79838a34cb31 /framework/Web/UI/WebControls/TLinkButton.php
parent6dd529fdc25404da07cf9256d92f2a94985c65fc (diff)
Update active controls.
Diffstat (limited to 'framework/Web/UI/WebControls/TLinkButton.php')
-rw-r--r--framework/Web/UI/WebControls/TLinkButton.php16
1 files changed, 14 insertions, 2 deletions
diff --git a/framework/Web/UI/WebControls/TLinkButton.php b/framework/Web/UI/WebControls/TLinkButton.php
index 6c318944..bcf43060 100644
--- a/framework/Web/UI/WebControls/TLinkButton.php
+++ b/framework/Web/UI/WebControls/TLinkButton.php
@@ -81,21 +81,33 @@ class TLinkButton extends TWebControl implements IPostBackEventHandler, IButtonC
parent::addAttributesToRender($writer);
if($this->getEnabled(true))
+ {
+ $this->renderLinkButtonHref($writer);
$this->renderClientControlScript($writer);
+ }
else if($this->getEnabled()) // in this case, parent will not render 'disabled'
$writer->addAttribute('disabled','disabled');
}
/**
* Renders the client-script code.
+ * @param THtmlWriter renderer
*/
protected function renderClientControlScript($writer)
{
+ $cs = $this->getPage()->getClientScript();
+ $cs->registerPostBackControl($this->getClientClassName(),$this->getPostBackOptions());
+ }
+
+ /**
+ * Renders the Href for link button.
+ * @param THtmlWriter renderer
+ */
+ protected function renderLinkButtonHref($writer)
+ {
//create unique no-op url references
$nop = "javascript:;//".$this->getClientID();
$writer->addAttribute('href', $nop);
- $cs = $this->getPage()->getClientScript();
- $cs->registerPostBackControl($this->getClientClassName(),$this->getPostBackOptions());
}
/**