Bonjour,
Je veux utiliser la librairie displaytag. Je pense l'avoir correctement installé dans mon application. Cependant, je n'arrive pas a la faire marcher...
Je passe en session a ma JSP une arrayList contenant des objets PersonneBean. PersonneBean est une classe standard trés simple (volontairement pour les tests) :
Je passe donc en session une arraylist contenant des PersonneBean (la liste est bien remplie, j'en suis sur...) avec dans mon action :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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 private String nomPrenom; private String mail; public PersonneBean(String nomPrenom, String mail){ this.nomPrenom = nomPrenom; this.mail = mail; } public String getMail() { return mail; } public void setMail(String mail) { this.mail = mail; } public String getNomPrenom() { return nomPrenom; } public void setNomPrenom(String nomPrenom) { this.nomPrenom = nomPrenom; }
Dans ma JSP quand je fais :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2 request.getSession(true).setAttribute("lesPers",arrayListPleineDePersonneBean);
Il m'affiche "Bien présent pourtant", juste apres un beau "Nothing found to display" et enfin il me liste bien les mails (logic:iterate), que j'ai mis pour debugger...
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15 <%@ taglib uri="http://displaytag.sf.net" prefix="display" %> ... <logic:present name="lesPers"> Bien présent pourtant </logic:present> <display:table name="lesPers"> <display:column property="nomPrenom"/> <display:column property="mail" /> </display:table> <br> <logic:iterate name="lesPers" id="toto"> <bean:write name="toto" property="mail"/> <br> </logic:iterate>
Le message "nothing to display" me laisse supposé que ma bibliotheque de tagdisplay est bien installée...
Mais pourquoi elle ne marche pas (j'ai envie de me taper la tête sur les murs..) ???
Merci beaucoup d'avance..
Partager