protected function getClientScriptOptions()
{
$options = parent::getClientScriptOptions();
$options['InitialValue'] = $this->getInitialValue();
$control = $this->getValidationTarget();
if ($control instanceof TListControl) {
$options['TotalItems'] = $control->getItemCount();
}
if ($control instanceof TRadioButton && strlen($control->getGroupName()) > 0) {
$options['GroupName'] = $control->getGroupName();
}
return $options;
}