Je dois afficher (ça c'est OK) et récupérer les données (mon pb) d'un tableau au nombre de lignes et colonnes variables, c'est à dire une liste (produitInventaireFormList) contenant une autre liste (qteParSfInventaireFormList).
Le code de ma JSP :
Ce que j'obtient :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7 <nested:iterate id="produit" indexId="numProduitForm" property="produitInventaireFormList"> <tr> <td><nested:hidden property="refId" indexed="true" /><nested:write property="refIdExt"/></td> <nested:iterate indexId="numSfForm" property="qteParSfInventaireFormList"> <td><nested:text property="qteParSf" indexed="true" /></td> </nested:iterate> </nested:iterate>
Ce que je voudrais (ou que je pense qu'il me faudrait pour récupérer mes données) :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12 <tr> <td><input type="hidden" name="ResultatInventairePrincipalForm[0].produitInventaireFormList[0].refId" value="254">255</td> <td><input type="text" name="ResultatInventairePrincipalForm[0].produitInventaireFormList[0].qteParSfInventaireFormList[0].qteParSf" value="74"></td> <td><input type="text" name="ResultatInventairePrincipalForm[1].produitInventaireFormList[0].qteParSfInventaireFormList[1].qteParSf" value="75"></td> <td><input type="text" name="ResultatInventairePrincipalForm[2].produitInventaireFormList[0].qteParSfInventaireFormList[2].qteParSf" value="76"></td> </tr> <tr> <td><input type="hidden" name="ResultatInventairePrincipalForm[1].produitInventaireFormList[1].refId" value="2540">2550</td> <td><input type="text" name="ResultatInventairePrincipalForm[0].produitInventaireFormList[1].qteParSfInventaireFormList[0].qteParSf" value="740"></td> <td><input type="text" name="ResultatInventairePrincipalForm[1].produitInventaireFormList[1].qteParSfInventaireFormList[1].qteParSf" value="750"></td> <td><input type="text" name="ResultatInventairePrincipalForm[2].produitInventaireFormList[1].qteParSfInventaireFormList[2].qteParSf" value="760"></td> </tr>
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12 <tr> <td><input type="hidden" name="ResultatInventairePrincipalForm.produitInventaireFormList[0].refId" value="254">255</td> <td><input type="text" name="ResultatInventairePrincipalForm.produitInventaireFormList[0].qteParSfInventaireFormList[0].qteParSf" value="74"></td> <td><input type="text" name="ResultatInventairePrincipalForm.produitInventaireFormList[0].qteParSfInventaireFormList[1].qteParSf" value="75"></td> <td><input type="text" name="ResultatInventairePrincipalForm.produitInventaireFormList[0].qteParSfInventaireFormList[2].qteParSf" value="76"></td> </tr> <tr> <td><input type="hidden" name="ResultatInventairePrincipalForm.produitInventaireFormList[1].refId" value="2540">2550</td> <td><input type="text" name="ResultatInventairePrincipalForm.produitInventaireFormList[1].qteParSfInventaireFormList[0].qteParSf" value="740"></td> <td><input type="text" name="ResultatInventairePrincipalForm.produitInventaireFormList[1].qteParSfInventaireFormList[1].qteParSf" value="750"></td> <td><input type="text" name="ResultatInventairePrincipalForm.produitInventaireFormList[1].qteParSfInventaireFormList[2].qteParSf" value="760"></td> </tr>
Partager