Hi everybody,
I have two tables: "demande" and "statut". the primary key of "statut" migrates in "demande". I generated the models, controllers and views with gii. I inserted data in theses tables.
But when I want to view the recorded information, it sends me an error "[color="#FF0000"]Trying to get property of non-object[/color]".
Here one view called "view"
<?php SysImmo::getNavigation();?><?php
/* @var $this DemandeController */
/* @var $model Demande */
$this->breadcrumbs=array(
'Demandes'=>array('index'),
$model->id_demande,
);
$this->menu=SysImmo::getMenuPorteletView($model->id_demande);
?>
<?php $this->widget(‘zii.widgets.CDetailView’, array(
'data'=>$model,
'attributes'=>array(
'libelle',
'date',
'motif',
[color="#FF0000"] array(
'label'=>$model->getAttributeLabel('statut'),
'value'=>CHtml::encode(StatutDemande::model()->findByPk($model->statut)->nom),
),[/color]
),
)); ?>
Help me please, what is the problem
Excuse my English, I’m French