Gestion dynamique des tables
Bonjour à tous,
dans ma jsp , j'ai une table produit comme suite:
Code:
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 49 50 51 52
|
<table id="tableProduit">
<tr>
<td>
<s:label value="MonTitre"/>
</td>
</tr>
<tr>
<td>
<s:textfield id="libelleProduit" />
</td>
<td>
<s:textfield id="prixProduit" />
</td>
<td>
<s:textfield id="dateFinProduit"/>
</td>
</tr>
<tr>
<td>
<s:textfield id="libelleProduit2" />
</td>
<td>
<s:textfield id="prixProduit2" />
</td>
<td>
<s:textfield id="dateFinProduit2"/>
</td>
</tr>
<tr>
<td>
<s:textfield id="libelleProduit2" />
</td>
<td>
<s:textfield id="prixProduit2" />
</td>
<td>
<s:textfield id="dateFinProduit2"/>
</td>
</tr>
<tr>
<td>
<s:textfield id="libelleProduit2" />
</td>
<td>
<s:textfield id="prixProduit2" />
</td>
<td>
<s:textfield id="dateFinProduit2"/>
</td>
</tr>
</table> |
dans ma classe action j'ai une liste d'objet Produit
List<Produit> produits;
//get et set
comment je pourrai mapper directement ma liste de produits défini dans la classe action.
Code:
<s:textfield id="libelleProduit" name="produits.????" />
merci d'avance de votre aide.:ccool: