public function setSelectedIndices($indices)
{
if ($this->canUpdateClientSide()) {
$this->updateListItems();
$n = $this->getControl()->getItemCount();
$promptValue = $this->getControl()->getPromptValue();
if ($promptValue === '') {
$promptValue = $this->getControl()->getPromptText();
}
$list = array();
foreach ($indices as $index) {
$index = intval($index);
if ($promptValue !== '') {
$index++;
}
if ($index >= 0 && $index <= $n) {
$list[] = $index;
}
}
if (count($list) > 0) {
$this->getPage()->getCallbackClient()->select($this->getControl(), 'Indices', $list);
}
}
}