<logic:iterate> et formulaire
Bonjour,
Cette question a déjà été abordée mais malgré mes recherches sur le forum ou sur le web, je n'arrive pas à me sortir du problème. Il me manque un élément je pense.
Voilà: je voudrais afficher un formulaire de 13 lignes identiques contenant chacune un certain nombre de champs saisie, et je voudrais bien sûr l'exploiter ensuite.
Avec ce que j'ai fait, la page jsp ne s'affiche pas. Elle "bute" sur le logic:iterate (si je supprime le logic:iterate, elle ne s'affiche pas).
jsp
Code:
1 2 3 4 5 6
| <html:form action="/valideDecompte">
<logic:iterate id="listeLignes" property="lignes" length="13">
<html:text name="listeLignes" property="motif" indexed="true"></html:text>
<html:text name="listeLignes" property="acte" indexed="true"></html:text>
</logic:iterate>
</html:form> |
ActionForm
Code:
1 2 3 4 5 6 7 8 9 10 11
| public class DecompteForm extends ActionForm {
private List<LigneDecompte> lignes;
public List<LigneDecompte> getLignes() {
return lignes;
}
public void setLignes(List<LigneDecompte> lignes) {
this.lignes = lignes;
}
} |
Le bean LigneDecompte contient les deux champs motif et acte.
struts-config (extrait)
Code:
1 2 3 4 5 6
| <form-bean name="decompteForm"
type="fr.irpauto.ipsa.saisiedecomptes.web.form.DecompteForm" />
...
<action path="/valideDecompte" name="decompteForm"
type="fr.irpauto.ipsa.saisiedecomptes.web.action.DecompteAction">
</action> |
Qu'est-ce qu'il me manque?
Merci pour votre aide.