Hi. I have a problem with TbEditedableColumn in YiiBooster.
View:
$this->widget(
'application.extensions.booster.widgets.TbGridView',
array(
'type' => 'striped bordered',
'dataProvider' => new CActiveDataProvider('Stats'),
'columns' => array(
'pid',
array(
'class' => 'application.extensions.booster.widgets.TbEditableColumn',
'name' => 'login',
'sortable' => false,
'editable' => array(
'model' => $model,
'attribute' => 'login',
'url' => $this->createUrl('stats/editableSaver'),
'placement' => 'right',
'inputclass' => 'span3'
)
)
),
)
);
Controller:
public function actionEditableSaver()
{
Yii::import('application.extensions.booster.components.TbEditableSaver');
$es = new TbEditableSaver('Stats');
$es->update();
}
When I try to save the edited fiels, I got this exception: Property "attribute" should be defined.
print_r($es):
TbEditableSaver Object
(
[scenario] => editable
[modelClass] => Stats
[primaryKey] =>
[attribute] =>
[model] =>
[value] =>
[errorHttpCode] => 400
[changedAttributes:protected] => Array
(
)
[_e:CComponent:private] =>
[_m:CComponent:private] =>
)
It means the model doesn’t get attributes.
How to fix that?