title: Yii update from modal window
body: <p>I need to update a modal window and show it when I click in the edit button.</p>
  
  <p>CONTROLLER:</p>
  
  <pre><code>public function actionUpdateAjax($id)
      {
          $contratos = ZfContratos::model()-&gt;findByPk($id);
  
          $this-&gt;renderPartial('//ZfContratos/_form_update', array('model'=&gt;$contratos), false, true);
      }
  </code></pre>
  
  <p>INDEX:</p>
  
  <pre><code>&lt;?php $this-&gt;beginWidget(
      'bootstrap.widgets.TbModal',
      array('id' =&gt; 'actualizar_contrato')
  ); ?&gt;
      &lt;div class="modal-header"&gt;
          &lt;a class="close" data-dismiss="modal"&gt;&amp;times;&lt;/a&gt;
          &lt;h4&gt;Actualizar contrato&lt;/h4&gt;
      &lt;/div&gt;
      &lt;div class="modal-body"&gt;
  
          &lt;?php $this-&gt;renderPartial('//ZfContratos/_form_update', array('model'=&gt;$contrato));?&gt;
  
      &lt;/div&gt;
      &lt;div class="modal-footer"&gt;
  
          &lt;?php $this-&gt;widget(
              'bootstrap.widgets.TbButton',
              array(
                  'label' =&gt; 'CANCELAR',
                  'url' =&gt; '#',
                  'htmlOptions' =&gt; array('data-dismiss' =&gt; 'modal'),
              )
          ); ?&gt;
      &lt;/div&gt;
  &lt;?php $this-&gt;endWidget(); ?&gt;
  </code></pre>
  
  <p>AND VIEW _contratos</p>
  
  <p>At this moment I have this:</p>
  
  <pre><code>&lt;?php echo CHtml::link('EDITAR', array('//ZfInmuebles/UpdateAjax', 'id'=&gt;$data-&gt;zf_contrato_id), array('class'=&gt;'btn', 'id'=&gt;'vermas')); ?&gt;
  </code></pre>
  
  <p>But I need that to be an ajaxbutton or ajaxlink, that refresh the div "actualizar_contrato" and show it.</p>