RDV+DIAL chat illimit� dans ta r�g!
no save
Assistance
Achat
News

Forum | programmation
probleme d'affichage de table avec hibernate
juliette, le jeu. 04 sept. 2008 à 12:54:29
Bonjour,
je travaille avec myeclipse 5.1,strut et hibernate,et je desire afficher une liste d'orientations à partir d'une table orientation.le mapping s'est bien passé mais j'obtien un tableau vide,c'est comme s'il n'yavais pas d'elements dans la table,pourtant ce n'est pas le cas.

voici le code que j'ai utilisé pour recuperer la table:


public static List getOrientationList(){
Session session = HibernateSessionFactory.getSession();
List list = null;
try{
Query query=session.createQuery("from Orientation u ");
list =query.list();


}catch(Exception ex){
ex.printStackTrace();
}
return list;
}



et pour afficher la table dans une page jsp j'ai fais:

<body>


<table border="1">
<tbody>
<%-- set the header --%>
<tr>
<td>Orientations</td>

</tr>
<%-- check if orientation exists and display message
--%>

<logic:empty name="getListOrientationForm" property="orientations">
<tr>
<td colspan="3">No orientations available</td>
</tr>
</logic:empty>
<logic:notEmpty name="getListOrientationForm" property="orientations">
<logic:iterate name="orienttions" property="orientations" id="orientation" >
<tr>
<%-- print out the orientation informations --%>
<td><bean:write name="orientation" property="libelleorientation" />
</td>
</logic:iterate>
</logic:notEmpty>
<%-- end interate --%>
</tbody>
</table>
</body>


Veuillez ,s'il vous plait,jeter un coup d'oeil à mon pb,ça me bloque totalement et il faut que j'avance

merciConfiguration: Windows XP
Internet Explorer 6.0


Marco la baraque
sept. 08
Suivant
REPONSES
Marco la baraque
sept. 08
juliette
sept. 08
Marco la baraque
sept. 08
juliette
sept. 08
Marco la baraque
sept. 08
juliette
sept. 08
Marco la baraque
sept. 08
juliette
sept. 08
Marco la baraque
sept. 08
juliette
sept. 08
Version Web
Réalisé par RedShift
no save