Example #1
0
 /**
  * Ensures that the anchor is rendered correctly when its Enabled property
  * changes in a callback
  * @param bool enabled
  */
 public function setEnabled($value)
 {
     if (parent::getEnabled() === $value) {
         return;
     }
     parent::setEnabled($value);
     if ($this->getActiveControl()->canUpdateClientSide()) {
         if ($this->getEnabled(true)) {
             $nop = "javascript:;//" . $this->getClientID();
             $this->getPage()->getCallbackClient()->setAttribute($this, 'href', $nop);
             $this->getActiveControl()->registerCallbackClientScript($this->getClientClassName(), $this->getPostBackOptions());
         } else {
             $this->getPage()->getCallbackClient()->setAttribute($this, 'href', false);
         }
     }
 }