I faced this problem before and had to find a workaround, since i could find a way to trigger an action from the CJuiDialog buttons. Instead of doing what you stated, why don’t you add a button inside the dialog? It is not the most elegant solution, in case you find one pls let me know! Hope this is helpful
<?php
$this->beginWidget('zii.widgets.jui.CJuiDialog', array(
'id' => 'window',
'options' => array(
'title' => 'My Custom Dialog',
'autoOpen' => false,
),
));
?>
// Here you add the button to the dialog instead of using CJuiDialogs options
<div class="row buttons">
<?php echo CHtml::ajaxSubmitButton('buttonSubmit'), CHtml::normalizeUrl(array('my_module/my_view', 'render' => false)), array('update' => 'js: function() {..}')); ?>
</div>
<?php $this->endWidget('zii.widgets.jui.CJuiDialog'); ?>