I've set up a page that displays server logs and added a filter form so I can filter the logs on specific actions, dates, etc. I can't seem to figure out how to use CPagination to split the results into pages, however. If I add the CPagination widget, when a page is selected from the widget, the filter form isn't resubmitted and my filter results are lost.
I'm at a loss for a simple solution to maintain my filter form data with the CPagination widget. Any suggestions would be great.
Update
I have this functioning but I had to set a session state to maintain my form data.
$filter=false;
$form=new LogFilterForm;
if(isset($_POST['LogFilterForm'])){
$form->attributes=$_POST['LogFilterForm'];
Yii::app()->user->setState('filter',$form);
$filter=true;
}
else if(Yii::app()->user->hasState('filter')){
$form=Yii::app()->user->getState('filter');
$filter=true;
}
Any ideas on how I can clear the session state on navigation to another page?