Strange refresh issue when clicking update button on gridview

I have a strange refresh issue.

This is the workflow:

I have a gridview showing a list of user privileges.

I click on the update button and I go to the update form.

I make changes to a bunch of checkboxes on the form, then click save.

I’m redirected to the originating page where the gridview is.

Gridview shows the changes I just made.

I click on the update button (same record) again and the checkboxes on the form haven’t updated, they don’t show my last lot of changes I made.

If I refresh the page, the checkboxes get loaded correctly.

Also, if I bypass the update button on the gridview and just type in the update url manually into the browser, it shows the correct data - however whenever I use the update button on the gridview, it fails to show the updated data. Seems to be some sort of refresh issue.

I have tried turning off cache on the browser, no effect.

This is what I have:


	public function actionOperatorsPrivEdit($id)













	public function loadOperatorsPrivilegesModel($id)




			throw new CHttpException(404,'The requested page does not exist.');

		return $model;


The Form:


echo $form->labelEx($model,'Privilege');

echo $form->textField($model,'Privilege', array('size'=>30,'maxlength'=>25));

echo $form->error($model,'Privilege');

echo '<label>';

echo $form->checkbox($model, 'View');

echo 'View';

echo '</label>';


echo '<br/><label>';

echo $form->checkbox($model, 'Edit');

echo 'Edit';

echo '</label>';


echo '<br/><label>';

echo $form->checkbox($model, 'Delete');

echo 'Delete';

echo '</label>';

echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); 


The GridView

$this->widget('zii.widgets.grid.CGridView', array(











				'update' => array(


					'url'=>'Yii::app()->urlManager->createUrl("prefs/operatorsPrivEdit", array("id"=>$data->PrivilegeID))',






Never mind, problem solved.

The controller was missing following code:

public function filters()


		return array(

			'accessControl', // perform access control for CRUD operations