cannot use Cjuidialog with xupload

I am trying to use the xupload extention for uploading multiple files inside a Cjuidialog .

my ajax link for Cjuidialog is as shown below



echo CHtml::ajaxLink('Upload',array('upload/index'),array(




                                 }'),array('id' => 'ty'.uniqid()));




                   'title'=>'Upload files',







              echo "<div id='upload'></div>";



My widget view is as shown below

<?php $this->pageTitle=Yii::app()->name; ?>

<h1>Multiple file upload example</h1>


$this->widget('ext.xupload.XUploadWidget', array(

                                       'url' => Yii::app()->createUrl("site/upload", array("parent_id" => 1)),

                   'model' => $model,

                   'attribute' => 'file',

                                       'multiple' => true,



What i need is to use this widget inside the div #upload… Eventhough i am getting the view inside the juidialog the upload is not working . please help…