Bonjour,

En parcourant une liste avec <logic:iterate> je crée un champ text <html:text> portant le même nom. J'arrive à accéder à une case particulière du tableau mais après mon validate et en cas d'erreur les zones de texte se vident ! Pourquoi ?

Dans mon FormBean :
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
 
             ...
             private String heureSoumission[];
             ...
	/** 
         * Method validate
         * @param ActionMapping mapping
         * @param HttpServletRequest request
         * @return ActionErrors
         */
	public ActionErrors validate(
		ActionMapping mapping,
		HttpServletRequest request) 
	{
 
		ActionErrors errors = new ActionErrors();
 
		if (heureSoumission != null)
		{
			for (int i=0; i<heureSoumission.length; i++)
			{									if (heureSoumission[i] == null || heureSoumission[i].trim().equals(""))
				{	errors.add("global",new ActionError("heure.envoi.obligatoire"));
					break;
				}
				else
					if (!DateUtil.controleValideFormatHeure(heureSoumission[i], Const.REGEXP_FORMAT_HEURE))
					{	errors.add("global",new ActionError("heure.envoi.format.invalide",Const.HEURE_HH_MM_SS));
						break;
					}	
			}
		}
 
		return errors;
	}             
	...
             /**
         * @return the heureSoumission
         */
	public String[] getHeureSoumission() {
		return heureSoumission;
	}
 
	/**
         * @param heureSoumission the heureSoumission to set
         */
	public void setHeureSoumission(String[] heureSoumission) {
		this.heureSoumission = heureSoumission;
	}
Dans ma JSP :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
 
<logic:iterate id="unElt" name="listElements" indexId="i" type="com.projet.Element">
<html:text property="heureSoumission" value="<%=unElt.getHeureSoumission()%>" size="10" maxlength="8" disabled="<%=unElt.isDesactiverText()%>" />
</logic:iterate>