Bonjour,

S'il vous plaît je suis dans un vrai pétrin, et cherché mainte fois sur ce forum mais je n'ai pas trouvé une information pour me rassurer.

Struts 1, Hibernate

J'ai une base de données contenant une table Question. J'ai réussi à afficher les questions dans la page JSP. j'ai affecté à chaque ligne 4 radio buttons pour que l'utilisateur coche sa réponse.

Je veux récupérer ces réponses pour les traiter dans l'ACTION. J'ai utiliser INDEXED=true mais j'ai pas réussi à les manipuler:

Voici le bout de code:
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
<logic:iterate name="list" id="var" >
 
<tr>
	<th align="center"scope="row" ><bean:write name="var" property="idQuestion" /></th>
	<th align="left"><bean:write name="var" property="libelle" /></th>
	<th align="center"><bean:write name="var" property="poids" /></th>
 
	<th align="center"> <html:hidden property="myAction" value="impact1"/> <html:radio  name="var" value="impact1" property="idQuestion" indexed="true" /></th> 
 
	<th align="center"> <html:hidden property="myAction1" value="impact2"/><html:radio  name="var" value="impact2" property="idQuestion" indexed="true" /></th> 
 
	<th align="center"> <html:hidden property="myAction2" value="impact3"/><html:radio  name="var" value="impact3" property="idQuestion" indexed="true" /></th> 
 
	<th align="center"> <html:hidden property="myAction3" value="impact4"/><html:radio  name="var" value="impact4" property="idQuestion" indexed="true" /></th> 
 
 
	</tr>
 
 
</logic:iterate>
J'ai même utilisé HIDDEN FIELDS et à chaque fois je reçois la valeur de MYACTION = impact1 même si je coche pas le radio button inhérent.

Ceci est un projet de PFE. Merci d'avance pour votre aide.

Cordialement HOUDA