/** * Returns the attributes to be rendered. * This method overrides the parent's implementation to default to * adding a [] to the name * @return ArrayObject attributes to be rendered */ protected function getAttributesToRender() { $attributes = parent::getAttributesToRender(); $attributes['name'] = $this->getUniqueID(); if ($this->isAutoPostBack()) { $attributes['onchange'] = 'javascript:' . $this->getPage()->getPostBackClientEvent($this, ''); } return $attributes; }
/** * Returns the attributes to be rendered. * This method overrides the parent's implementation to add checking * for rows and the multiple flag. * @return ArrayObject attributes to be rendered */ protected function getAttributesToRender() { $attributes = parent::getAttributesToRender(); if ($this->getSelectionMode() == 'Multiple') { $attributes['multiple'] = 'multiple'; $attributes['name'] = $this->getUniqueID() . '[]'; } else { $attributes['name'] = $this->getUniqueID(); } if ($this->isAutoPostBack()) { $attributes['onchange'] = 'javascript:' . $this->getPage()->getPostBackClientEvent($this, ''); } $attributes['size'] = $this->getRows(); return $attributes; }
/** * Returns the attributes to be rendered. * This method overrides the parent's implementation to default to * adding a [] to the name * @return ArrayObject attributes to be rendered */ protected function getAttributesToRender() { $attributes = parent::getAttributesToRender(); if ($this->getRepeatLayout() === 'Table') { if (($cellSpacing = $this->getCellSpacing()) >= 0) { $attributes['cellspacing'] = $cellSpacing; } else { $attributes['cellspacing'] = '0'; } if (($cellPadding = $this->getCellPadding()) >= 0) { $attributes['cellpadding'] = $cellPadding; } else { $attributes['cellpadding'] = '0'; } } //$attributes['id']=$attributes['id'].':cblist'; return $attributes; }