function __construct($id)
 {
     parent::__construct($id);
     $this->datasource = array();
 }
 function renderAttributes()
 {
     foreach (array('readonly', 'disabled') as $attribute) {
         if (!$this->getBoolAttribute($attribute, false)) {
             $this->removeAttribute($attribute);
         }
     }
     parent::renderAttributes();
 }
 function renderAttributes()
 {
     if (!$this->hasAttribute('name') && $this->hasAttribute('id')) {
         $this->setAttribute('name', $this->getAttribute('id'));
     }
     foreach (array('readonly', 'disabled') as $attribute) {
         if (!$this->getBoolAttribute($attribute, false)) {
             $this->removeAttribute($attribute);
         }
     }
     parent::renderAttributes();
 }