Using Dynamic model variable for CListView sortableAttributes

Hi,

I’m trying to use CListView to create a sortable listing, is it possible to use dynamicly created model attributes for the sortableAttributes?

EG:

Model




class User extends CActiveRecord

{

......

	public function getDistance()

	{

                //Obviously this will be calculated

		return 340;


	}


}



Widget Code


<?php $this->widget('zii.widgets.CListView',array(

	'dataProvider'=>$dataProvider,

	 'sortableAttributes'=>array(

         'distance',


        'username',

        'lastvisit'=>'Last Visit',

    ),

	'itemView'=>'_view',

)); ?>