bonjour,
je travail avec myeclipse et je veux faire une select dynamique mais elle ne marche pas
bon voila mon code dans la page jsp:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
 
<bean:define id="ids" property="lesChoix" value="lesChoix" /> 
<html:select property="typeUtil">
   <html:options collection="ids" property="value" labelProperty="label" /> 
</html:select>
et dans la page 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
 
/** type property */
private String typeUtil;
 
/** nom property */
private String nom;
ArrayList lesChoix = new ArrayList(); 
 
public void reset(ActionMapping mapping, HttpServletRequest request) { 
  // initialisation de la liste des articles de la liste déroulante 
  this.lesChoix.clear(); 
  /* 
  * remplir la list:lesChoix, a partir de la base de données 
   */ 
  lesChoix.add(new LabelValueBean("admin", "Administrateur" )); 
  lesChoix.add(new LabelValueBean("biblio", "Biblothecaire" )); 
  lesChoix.add(new LabelValueBean("util", "Utilisateur" )); 
}
/** 
* @return Returns the lesChoix. 
*/ 
public ArrayList getLesChoix() { 
       return lesChoix; 
} 
 
/** 
* @param lesChoix The lesChoix to set. 
*/ 
public void setLesChoix(ArrayList lesChoix) { 
	this.lesChoix = lesChoix; 
}
/** 
* Returns the type.
* @return String
*/
public String getTypeUtil() {
	return typeUtil;
}
 
/** 
* Set the type.
* @param type The type to set
*/
public void setTypeUtil(String type) {
	this.typeUtil = type;
}
donc j ai mis tous les getter donc j ai besoin mais voila j ai l'erreur suivante :
org.apache.jasper.JasperException: Exception in JSP: /ajoutAdmin.jsp:37

34: Confirmer mot de passe : <html:password property="mp2"/><br/>
35: Choisir le role :
36: <bean:define id="ids" property="lesChoix" value="lesChoix" />
37: <html:select property="typeUtil">
38: <html:options collection="ids" property="value" labelProperty="label" />
39: </html:select>

cause mère

javax.servlet.ServletException: No getter method available for property typeUtil for bean under name org.apache.struts.taglib.html.BEAN

aider moi plz