public function radioButtonGroupsList($model, $attribute, $data, $htmlOptions = array())
	{
		$buttons = array();
		$scripts = array();

		$hiddenFieldId = CHtml::getIdByName(get_class($model) . '[' . $attribute . ']');
		$buttonType = isset($htmlOptions['type']) ? $htmlOptions['type'] : null;

		foreach ($data as $key => $value) {
			$btnId = CHtml::getIdByName(get_class($model) . '[' . $attribute . '][' . $key . ']');

			$button = array();
			$button['label'] = $value;
			$button['htmlOptions'] = array(
				'value' => $key,
				'id' => $btnId,
				'class' => (isset($model->$attribute) && $model->$attribute == $key ? 'active': ''),
			);
			$buttons[] = $button;

			// event as ordinary input
			$scripts[] = "\$('#" . $btnId . "').click(function(){
                \$('#" . $hiddenFieldId . "').val('" . $key . "').trigger('change');
            });";
		}

		Yii::app()->controller->widget('bootstrap.widgets.CiiButtonGroup', array(
			'buttonType' => 'button',
			'toggle' => 'radio',
			'htmlOptions' => $htmlOptions,
			'buttons' => $buttons,
			'type' => $buttonType,
		));

		echo $this->hiddenField($model, $attribute);

		Yii::app()->clientScript->registerScript('radiobuttongrouplist-' . $attribute, implode("\n", $scripts));
	}