Problème de recupération de données dans un rich:dataTable
Salut tous le monde ;
je réalise un projet en jee,j'ai crée un managedBean et une facelet pour afficher les donnée dans un rich:dataTable ,
mais les données ne sont pas affichées et je ne vois pas d'erreur sur la console
je vous informe que j'ai testé (avec Junit)ma couche métier et tous marche bien .
j'ai besoin d'aide s'il vous plait
ci-desssous le fichiers suivant :
*victimeBean.java
*victimegestion.xhtml
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
|
package ma.ocpgroup.web;
import java.io.Serializable;
import java.util.List;
import javax.annotation.PostConstruct;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.ViewScoped;
import ma.ocpgroup.domain.model.Victime;
import ma.ocpgroup.metier.interfs.VictimeServiceInterf;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
//@javax.inject.Named
@ManagedBean
@ViewScoped
public class VictimeBean implements Serializable{
@Autowired
private VictimeServiceInterf victimeServiceInterf;
private List<Victime> victimeList;
@PostConstruct
public void init()
{
victimeList= victimeServiceInterf.getAllVictimes();
}
public List<Victime> getVictimeList() {
return victimeList;
}
public void setVictimeList(List<Victime> victimeList) {
this.victimeList = victimeList;
}
} |
et
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich">
<ui:composition template="layout.xhtml">
<ui:define name="header">
<h:graphicImage value="header.png" library="images" />
</ui:define>
<ui:define name="title">Gestion des victimes</ui:define>
<ui:define name="content">
<h:form id="form">
<rich:dataTable value="#{victimeBean.victimeList}" var="victimes" rows="5">
<rich:column>
<f:facet name="header">Matricule</f:facet>
<h:outputText value="#{victimes.victimeMatricule}" />
</rich:column>
<rich:column>
<f:facet name="header">Nom</f:facet>
<h:outputText value="#{victimes.victimeNom}" />
</rich:column>
</rich:dataTable>
</h:form>
</ui:define>
</ui:composition>
</ui:composition> |
je suis en écoute de vos propositions .