/**
* Sets the selection mode of the list control (Single, Multiple)
* on the client-side if the {@link setEnableUpdate EnableUpdate}
* property is set to true.
* @param string the selection mode
*/
public function setSelectionMode($value)
{
if (parent::getSelectionMode() === $value) {
return;
}
parent::setSelectionMode($value);
$multiple = $this->getIsMultiSelect();
$id = $this->getUniqueID();
$multi_id = $id . '[]';
if ($this->getActiveControl()->canUpdateClientSide()) {
$client = $this->getPage()->getCallbackClient();
$client->setAttribute($this, 'multiple', $multiple ? 'multiple' : false);
$client->setAttribute($this, 'name', $multiple ? $multi_id : $id);
}
}