update database with juisortable

i want to update field in db with juisortable but i was stuck here for 3days…

i have this in my view


<?php

    // Organize the dataProvider data into a Zii-friendly array

   $items = CHtml::listData(HelpContent::model()->findAllBySql('select * from help_content where id_help_menu = '.$_GET['id'].' order by weight asc'), 'id_help_content', 'name');

    

    

    // Implement the JUI Sortable plugin

    $this->widget('zii.widgets.jui.CJuiSortable', array(

        'id' => 'item',

        'items' => $items,

    'tagName'=>'ol',

    'itemTemplate'=>'<li id="{id}" class="ui-state-default"><span class="ui-icon ui-icon-arrowthick-2-n-s"></span>{content}</li>',

		'options'=>array(

    		'delay'=>100,

    		'placeholder'=>'ui-state-highlight',

   			

    		'cursor'=>'move',

    

			'update'=>"js:function(){

                        $.ajax({

                                type: 'POST',

                                url: '{$this->createUrl('helpContent/sort')}',

                                 data: $(this).sortable('serialize'),								

                        });

                         

                }",

    

		),

    ));

   

?>

im my controller


public function actionSort()

        {


            foreach ($_POST['id'] as $position => $item)

            {

            	$content = HelpContent::model()->findByPk($item);

            	 $content->weight = $position;

            	 return $content->save();

            	/*$connection=Yii::app()->db;

            	$connection->active=true;

            	$sql = 'update help_content set weight = :weight

                                    	where id_help_content = :id_help';

            	$command=$connection->createCommand($sql);

            	$command->bindParam(":id_help",$item,PDO::PARAM_STR);

            	$command->bindParam(":weight",$position,PDO::PARAM_STR);

            	$command->execute();*/

            }


        }

my rules


array('allow', 

				'actions'=>array('sort'),

				'users'=>$admin,

			),

what am i doing wrong???

please your help…

thanks in advance

What is the exact problem?

What does net tab from firebug show? Are request sent after sorting? What are the server replies? Try using ‘stop’ event instead of update, at lest for sake of testing.

thanks for your respone…

i’ve done with sortable in gridview like tutorial in this link…