CTreeView filter/update


Does anyone know if there a way to filter data inside de widget CTreeView like in the CGridView ?

My goal is to load data in the treeview depending on a dropdownlist

I need to select group in a dropdownlist and then, display data of a selected group in the treeview

thank you

Here is my _treeview.php view






        'animated'=>'fast', //quick animation

        'collapsed'=>false,//remember must giving quote for boolean value in here


                'class'=>'treeview-famfamfam',//there are some classes that ready to use gray black red famfamfam



Here is the view with the dropdownlist






echo CHtml::dropDownList(	

    'groupeId', //cbxName

    '', //selected value

    CHtml::listData($dataGroupe,'id','nom'), array( //data

         'ajax' => array(

         'type'=>'POST', //request type

         'url'=>CController::createUrl('manage/getSitesFromGroupe'), //url to call.

         'update'=>'#siteId', //selector to update









//empty since it will be filled by the other dropdown

echo CHtml::dropDownList(	

    'siteId', //cbxName

    '', // selected value

    array(), //data will be set by groupeID


       'ajax' => array(						











Here is a part of the controlleur

public function actionRenderTreeView($filtre=''){    			

		$urlTreeView = $this->createUrl('manage/remplisTreeView');


		$cManageComponent = new ManageComponent();

		$dataTreeView = $cManageComponent->getTreeViewDatas($filtre);




And then the components

public function getTreeViewDatas($filtre=''){

		// partie _treeView

		$cGroupeComponent = new GroupeComponent();


			$mySearch = new GroupeVO;

			$mySearch->nom = $filtre;

			$groupes = $cGroupeComponent->getGroupeSearch($mySearch);	

		} else {

			$groupes = $cGroupeComponent->getGroupes();


		$tableauTreeView = null;

		foreach ((array)$groupes as $groupe)		


			$tableauSite = null;			

			foreach((array)$groupe->sites as $site){

				foreach((array)$site->applications as $app){

					$tableauAppli[] = array('text'=>$app->repertoire.' '.$app->commentaire);



				$tableauSite[] = array('text'=>$site->nom.' ( '.count($site->applications).' application'.(count($site->applications)>1?'s':'').' )', 'children'=>$tableauAppli);

				//echo '</blockquote>';



$tableauTreeView[] = array('text'=>$groupe->nom.' ( '.count($groupe->sites).' site'.(count($groupe->sites)>1?'s':'').' )', 'children'=>$tableauSite);



$dataTreeView = CTreeView::saveDataAsJson($tableauTreeView);							

return ($dataTreeView);




any ideas ?


i want to refresh (Update) my CTreeView when data inserted in db…

any one can help me about this issue?