bonjour,

j'ai un tableau dans ma jsp que je remplis avec ce que je saisis dans 2 combo et 2 champs de text(j'ai mis ces 4 info dans un objet "recep")

voici le code de ma jsp:

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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
 
<nested:form action="/recep3.do" method="post">
 
  <html:hidden property="hidden" value="default"></html:hidden>
 
 
    <nested:nest property="recep">
   <td> 
 
       <nested:select  property="article">
      <html:option value=""></html:option> 
         <nested:options property ="nomArticle"/>
           </nested:select>
 
   </td>
 
 
 
 
 
   <td> <nested:text property="ND" maxlength="15" ></nested:text>  </td>
 
<td> <nested:text property="NF"  maxlength="15" ></nested:text>  </td>
 
 
  <td>    
       <nested:select  property="profil"  disabled="false">
    <html:option value=""></html:option> 
      <nested:options property ="nomProfil"></nested:options>
      </nested:select> 
 
 
    </td>
 
    </nested:nest>
   </tr>
 
   <tr>
   <td>
   <nested:submit onclick="setHidden('ajouter');">ajouter</nested:submit>
  <td/>
 
   <tr/>
  </nested:form>
 
  	<table  border="1" width="100%|20">
 
 
	<tr>
   <th>Article</th>
   <th>Numéro de série début</th>
   <th>Numéro de série fin</th>
   <th>Profil</th>
   <th>Quantité</th>
   </tr>    
 
	<nested:root name="recepForm">
		<nested:iterate property="recepList">
 
 
			<tr onmouseover="this.style.backgroundColor='bleu'"
		onmouseout="this.style.backgroundColor='white'">
 
				<td><nested:write property="article"/></td>
				<td><nested:write property="ND"/></td>
				<td><nested:write property="NF"/></td>
				<td><nested:write property="profil"/></td>
				<td><nested:write property="qte"/></td>
			</tr>
		</nested:iterate>
	</nested:root>
</table>
    </body>
  </html:html>
et voici l'action qui ajoute l'objet "recep" dans le tableau :

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
 
public ActionForward ajouter(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response) {
		RecepForm recepForm = (RecepForm) form;// TODO Auto-generated method stub
 
		Recep recep= recepForm.getRecep();
 
		                                                                                                      	String n=recep.getND();
	String f=recep.getNF();
 
	String art=recep.getArticle();
	String prof=recep.getProfil();
 
 
recepList= recepForm.getRecepList() ;
recepList.add(recep);
 
 
		  return mapping.findForward("test2");
	}


je veux maintenant quand je clique sur une ligne du tableau qui contient l'objet "recep"il la supprime
(c'est le contrair d'ajouter une ligne)

svp comment je dois faire ça?

merci bcp