2012-03-05 22 views
0

私はyiiをフレームワークとして使用してウェブサイトを作成する作業をしています。私はどのように私は各タブのグリッドビューで2つのタブを表示することができるあなたの助けをしたいと思います。私はタブを作成することができましたが、タブにグリッドビューを置くたびに、最初のタブはグリッドビューを表示せず、最後のタブだけがグリッドビューを表示します。yiiフレームワークの2つのタブ

は、ここでは、その後、私はあなたの代わりにYiiの中にjQueryのウィジェットを使用することをお勧め第一のコードと第二タブ

 <div id="gridview-claims"> 
     <script type="text/javascript"> 
     if ($gif.content) { 
      $.extend($gif.content, { 
       //DO SYSTEM SPECIFIC STUFF AFTER CONTENT IS LOADED 
       onload : function (content) { 
       //APPLY FLEXGRID TO TABLES 
       $.get('/ADS/index.php/claims/admin', function (data) { 
        content.find('#gridview-claims').html(data); 
        });     
        } 
       }); 
      } 
      </script> 
      </div> 


<div id="tb-2-content" class="tb-content hidden"> 
      <div id="gridview-deduction"> 
      <script type="text/javascript"> 
      if ($gif.content) { 
       $.extend($gif.content, { 
       //DO SYSTEM SPECIFIC STUFF AFTER CONTENT IS LOADED 
       onload : function (content) { 
       //APPLY FLEXGRID TO TABLES 
       $.get('/ADS/index.php/deduction/admin', function (data) { 
       content.find('#gridview-deduction').html(data); 

        });   

        } 
       }); 
      } 
      </script> 
      </div> 

答えて

1

です。各タブについて、レンダー機能を使用してグリッドを表示することができます。例えば

$this->widget('zii.widgets.jui.CJuiTabs', array(
     'tabs'=>array(
      'Pediatric Info'=> $this->renderPartial("_view", array('data' => $model, 'patientID'=> $model->id), true, true), 
      'Contacts' =>$this->renderPartial("_viewContacts", array('data' => $model, 'patientID'=> $model->id), true, true), 
      // panel 3 contains the content rendered by a partial view 
      'Insurance'=> $this->renderPartial("_viewInsurance", array('data' => $model, 'patientID'=> $model->id), true, true), 
      'Activities' =>$this->renderPartial("_viewEncounters", array('data' => $model, 'patientID'=> $model->id), true, true), 
     ), 
     // additional javascript options for the tabs plugin 
     'options'=>array('collapsible'=>true,), 
    )); 
0

2二つの形式でタブが私の作品..

<?php 
     $this->widget('zii.widgets.jui.CJuiTabs', array(
     'tabs'=>array(
      'Share By Email'=> $this->renderPartial("_form", array('model' => $model), true, true), 
      'Share to Friends'=> $this->renderPartial("_friendsform", array('model' => $model), true, true), 


     ), 
     // additional javascript options for the tabs plugin 
     'options'=>array('collapsible'=>true,), 
    )); 


?> 
関連する問題