Bonjour a tous,

Je dois faire une application de gestion de garage avec des voitures.

Fichier struts-config-garage.xml :
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
<struts-config>
 
	<form-beans>
		<form-bean name="gestionGarage" type="form.GarageForm" />
	</form-beans>
 
	<action-mappings>
 
	<!-- Affiche la page principale -->
	<action path="/home" forward="/pages/home.jsp" />
 
	<!-- Liste les garages -->
	<action path="/liste" type="action.ListGarageAction">
		<forward name="success" path="/pages/listGarage.jsp" />
	</action>
 
	</action-mappings>
 
</struts-config>
fichier GarageForm.java :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
...
	public Garage getG() {
		return this.g;
	}
 
	public void setG(Garage g) {
		this.g = g;
	}
...
Fichier struts-config-voiture.xml :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
<struts-config>
 
	<form-beans>
		<form-bean name="gestionVoiture" type="form.VoitureForm" />
	</form-beans>
 
	<action-mappings>
		<action path="/repare" forward="/pages/formVoiture.jsp" />
	</action-mappings>
 
</struts-config>
fichier VoitureForm.java :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
...
	public Voiture getV() {
		return this.v;
	}
 
	public void setV(Voiture v) {
		this.v = v;
	}
...
Lorsque j'appelle liste.do, alors j'obtiens bien un liste de tous les garages.
Mais quand je fait appelle au formulaire de reparation des voitures grace au repare.do

J'obtiens l'erreur suivante :
No getter method for property: "v.id" of bean: "form.GarageForm"

Tous mes objets ont un id et les getters and setters ont été généré par Eclipse. Seulement le bean est pas bon, ce devrait être "form.VoitureForm"

Mais comment corriger ça ????

Merci d'avance,

Osiris6880