コード例 #1
0
 /**
  * Adds attributes to renderer.
  * @param THtmlWriter the renderer
  */
 protected function addAttributesToRender($writer)
 {
     $page = $this->getPage();
     $page->ensureRenderInForm($this);
     if ($this->getIsMultiSelect()) {
         $writer->addAttribute('multiple', 'multiple');
     }
     if ($this->getEnabled(true)) {
         if ($this->getAutoPostBack() && $this->getEnableClientScript() && $page->getClientSupportsJavaScript()) {
             $this->renderClientControlScript($writer);
         }
     } else {
         if ($this->getEnabled()) {
             $writer->addAttribute('disabled', 'disabled');
         }
     }
     parent::addAttributesToRender($writer);
 }