Bonjour
j'utilise struts pour afficher une collection dont les champs sont:champ1 et champ2
champ1 contient libellé de département
champ2 l'id du département soit: iddept
Au niveau où j'ai utilisé une liste il signale l'erreur:
cannot find bean under name liste
c'est au niveau du champ dept de mon formulaire ci-dessous.

voici le formulaire:
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
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
   <layout:skin includeScript="true"/>
    </head>
 
  <body>
 
    <html:form action="noncon">
    <table border="1" id="table">
        <thead>
            <tr>
                <th colspan="2">formulaire</th>
 
            </tr>
        </thead>
        <tbody>
            <tr>
               <td><bean:message key="noncon.libNoncon"/></td>
                <td><html:text property="libNoncon"/></td>
            </tr>
            <tr>
               <td><bean:message key="noncon.duree"/></td>
                <td><html:text property="duree"/></td>
            </tr>
             <tr>
               <td><bean:message key="noncon.date"/></td></tr>
 
 
               <layout:line  space="false"   >	
		<layout:date  key="" property="date" styleClass="LABEL" 
			calendarTooltip="Sélectionner une date (jj/mm/aa)" /> 
 
	     </layout:line>
 
             <tr>
               <td><bean:message key="noncon.dept"/></td>
                <td>
                               <html:select property="dept"   >
                                <html:options collection="Liste"  property="champ2"  labelProperty="champ1" />
                               </html:select>  
 
            </td>
            </tr>
                              <tr>
                              <td>Origne de Non conformité</td></tr>
 
 
                              <tr>
                                  <td><bean:message key="noncon.autre"/></td>  
                                  <td> <html:radio property="origine" value="1" /></td>
                              </tr>
                              <tr>
                                <td> <bean:message key="noncon.fournisseur"/></td>  
                                <td><html:radio property="origine" value="2"/></td>   
                              </tr>
                              <tr>
                                <td> <bean:message key="noncon.interne"/></td>  
                                  <td><html:radio property="origine" value="3"/></td>   
                              </tr>
 
 
 
            <tr>
                <td colspan="2">
                    <html:submit value="Valider"/>
                    <html:reset value="rétablir" property="retablir"/>
                </td>      
            </tr>
        </tbody>
    </table>
     </html:form>
    </body>
voici l'actionform :
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
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
public class NonconForm extends org.apache.struts.action.ActionForm {
 
 
   private Integer idNoncon;
   private Integer idAnalyse;
   private Integer idTrait; 
   private Integer idPerso;
   private String libNoncon;
   private String origine;
   private Integer dept;
   private Date date;
   private Integer duree;
 
 
 
 
    /**
     *
     */
    public NonconForm() {
        super();
        // TODO Auto-generated constructor stub
    }
 
      public Integer getIdNoncon() {
        return idNoncon;
    }
 
    public void setIdNoncon(Integer idNoncon) {
        this.idNoncon = idNoncon;
    }
 
    public Integer getIdAnalyse() {
        return idAnalyse;
    }
 
    public void setIdAnalyse(Integer idAnalyse) {
        this.idAnalyse = idAnalyse;
    }
 
    public Integer getIdTrait() {
        return idTrait;
    }
 
    public void setIdTrait(Integer idTrait) {
        this.idTrait = idTrait;
    }
 
    public Integer getIdPerso() {
        return idPerso;
    }
 
    public void setIdPerso(Integer idPerso) {
        this.idPerso = idPerso;
    }
 
    public String getLibNoncon() {
        return libNoncon;
    }
 
    public void setLibNoncon(String libNoncon) {
        this.libNoncon = libNoncon;
    }
 
    public String getOrigine() {
        return origine;
    }
 
    public void setOrigine(String origine) {
        this.origine = origine;
    }
 
    public Integer getDept() {
        return dept;
    }
 
    public void setDept(Integer dept) {
        this.dept = dept;
    }
 
    public Date getDate() {
        return date;
    }
 
    public void setDate(Date date) {
        this.date = date;
    }
 
    public Integer getDuree() {
        return duree;
    }
 
    public void setDuree(Integer duree) {
        this.duree = duree;
    }
}