我有以下数据表,其中包含图片列表。我想显示上传它的用户的ech图片。因此,用户是表格图片中的外键,它是数据表中的car.utilisateur_nom_ut。用primefaces显示外键的值
XHTML:
<p:dataGrid var="car" value="#{listeGrpBean.pictureList}" columns="2" id="unique"
rows="12" paginator="true"
emptyMessage="Pas de photos partagées dans ce groupe"
>
<p:panel header="#{car.description}" style="width:100%">
<h:panelGrid columns="2">
<h:outputText styleClass="infos_img_title" value="ajoutée le :"/>
<h:outputText styleClass="infos_img" value="#{car.date_pub}">
<f:convertDateTime pattern="dd/MM/yyyy HH:mm"/>
</h:outputText>
<h:outputLabel styleClass="infos_img_title" for="added" value="Ajouté par: "/>
<h:outputText styleClass="preformatted" value="#{car.utilisateur_nom_ut}" />
</p:panel>
</p:dataGrid>
我有以下错误:
javax.el.PropertyNotFoundException: /example.xhtml @83,94 value="#{car.utilisateur_nom_ut}": Property 'utilisateur_nom_ut' not found on type com.pfe.domaine.Document
请发表您的托管bean和汽车类 – zargarf
这里是我的照片类:'@实体 公共类图片实现Serializable { \t @Id \t @ GeneratedValue(strategy = GenerationType.AUTO) \t private int ID_info; \t私有字符串描述; \t @Temporal(TemporalType.TIMESTAMP) \t private Date date_pub; \t @ManyToOne \t private Utilisateur utilisateur; }' – joice
我管理的bean: '@ManagedBean @SessionScoped 公共类ListeGrpBean实现Serializable { 私人列表