Hi mates!
Next view, works with render() but not with renderPartial(), what is the explanation?
The trouble, might be caused by CJuiTabs, considering that CDetailView works accurately in both case.![]()
The render action views is the same for both, and the difference is that:
- renderPartial, is calling from an ajax request.
View file: _view_day.php
<?php
$this->widget('zii.widgets.CDetailView', array(
'data' => $modelDay,
'attributes' => array(
'id_day',
array(
'name' => 'name',
'type' => 'text',
'value' => $modelDay->nameLanguage($code),
),
),
));
?>
<?php
$count = 1;
$tabs = array();
foreach($modelDay->timetables as $timetable)
{
$tabs['Itinerario'.$count] = $this->renderPartial('tabs/_view_timetable', array('model'=>$timetable,'code'=>$code),true);
$count++;
}
$this->widget('zii.widgets.jui.CJuiTabs', array(
'id' => 'day-tabs',
'tabs'=>$tabs,
'options'=>array(
'collapsible'=>true,
'selected'=>0,
),
'htmlOptions'=>array(
'style'=>'width:500px; '
),
));
?>
action: _view_day.php
public function actionViewDay ($id,$code=130, $serie=1) {
$idRoute = (int) $id;
$codeLanguage = (int) $code;
$aux_serie = (int) $serie;
$model = ($this->loadModel($idRoute, 'Route'));
$modelDay = ($this->loadModel($model->getId_Day($aux_serie, $codeLanguage), 'Day'));
$this->render('view_day', array(
'model' => $model,
'code' => $codeLanguage,
'modelDay' => $modelDay,
));
}

