Cjuidialog Open Updating Question

On a CJuiDialog, I have seen many examples of data being passed to the dialog via the jQuery data function such as I do here:

echo CHtml::button(‘Edit Category’, array(‘onclick’=>’{$("#dialogModifyCategory").data(“category”,$("#id_category").val)).dialog"open");}’,‘class’=>‘assetControl3’));

The CJuiDialog Widget, however, only seems to access the dialog elements when first loaded, and not when the dialog is opened. The alert is not fired on dialog open. Is there some trick into making the widget reload the dialog on an open also??

$url = Yii::app()->createUrl('asset/modifycategory');

$this->beginWidget('zii.widgets.jui.CJuiDialog', array( // the dialog



        'title'=>'Modify Category',





        'buttons'=>array('Submit'=>'js: function() {

            editdata = {edit_category: $("#edit_category").val(), id_category: $("#id_category").val()};



                url: "' .$url. '", 

                data: editdata,

                success: function() {}





            'Cancel'=>'js: function() {$(this).dialog("close");}'),






 echo "<a class='assetLabel2' style='left: 25px'>Edit Category</a>";

 echo '</br>';

 echo CHtml::textField('edit_category',$assetData['category'], array('class'=>'assetEntry', 'style'=>'left: 25px'));