Bonjour,
voici mon problème :
j'affiche à l'écran une liste de clients (par exemple). J'aimerais y ajouter un bouton pour pouvoir sortir sous format PDF la liste complète des clients mais je ne sais pas comment m'y prendre pour soumettre la liste complète à partir de ma jsp...
j'ai créé un formulaire propre à la gestion des infos d'UN client, pour pouvoir le modifier par exemple, mais là c'est différent je veux envoyer à mon Action l'ensemble des clients...
Comment stocker ces données ?
je suis perdu de chez perdu malgré des recherches sur le net
Merci pour votre aide !
Voici 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135 <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <%@ taglib prefix="tiles" uri="struts-tiles.tld" %> <%@ taglib prefix="html" uri="struts-html.tld" %> <%@ taglib prefix="bean" uri="struts-bean.tld" %> <%@ taglib prefix="nested" uri="struts-nested.tld" %> <%@ taglib prefix="logic" uri="struts-logic.tld" %> <%@ page import="com.developpez.dubois.locap.*" %> <%@ page import="java.util.Map"%> <body> <Table height="0" cellspacing="10" cellpadding="0"> <TR> <html:form action ="/AfficherListeClients.do"> <script> var urlSupClient = "" + "<html:rewrite forward='supprimerClient' />"; var urlVisuPDF = "" + "<html:rewrite forward='visuPDF' />"; </script> <TD> <table width="100"> <TR> <td width="250"> <html:link forward="ajouterClient"> <bean:message key="option.ajout.client"/> </html:link> </td> </TR> </table> </TD> <TD> <TABLE width="900" border = "1"> <TBODY> <tr style = "background-color : #66CCFF;"> <th width="200"><bean:message key="client.general.identifiant"/></th> <th width="350"><bean:message key="client.general.nom"/></th> <th width="350"><bean:message key="client.general.prenom"/></th> </tr> </TBODY> </table> </TD> <TD width="100" align="center"> <a href="#" onclick="javascript:fenetreOperation(urlSupClient,cleEnreg);"> <bean:message key="option.supp.client"/> </a> </TD> <TD width="100" align="center"> <a href="#" onclick="javascript:fenetrePDF(urlVisuPDF,cleEnreg);"> <bean:message key="option.visuPdf"/> </a> </TD> </html:form> </TR> <bean:size id="elementCli" name="LISTE_CLIENTS" /> <logic:notEqual name="elementCli" value="0"> <logic:iterate id="elementClient" name="LISTE_CLIENTS" type="com.developpez.dubois.locap.form.ClientForm" indexId="index" > <bean:define id="params" name="elementClient" property="params" type="java.util.Map"/> <% StringBuffer nomDiv = new StringBuffer(); nomDiv.append("divInfosCli"); nomDiv.append(index); %> <TR> <TD> <table width="100"> <TD></TD> </table> </TD> <TD> <table width="900"> <tbody> <%params.put("id",elementClient.getIdentifiant());%> <tr> <td width="200"> <html:link forward="saisirModifClient" name="elementClient" property="params" onclick="attente(positionX(), positionY('div'));"> <bean:write name="elementClient" property="identifiant"/> </html:link> </td> <td id="lignom" width="350" onmouseover ="ouvrirDiv('<%= nomDiv.toString() %>',600,document.getElementById('lignom').style.top);" onmouseout ="fermerDiv('<%= nomDiv.toString() %>');"> <DIV id= <%= nomDiv.toString() %> style="position: absolute; overflow: auto; visibility: hidden; z-index: 100; background-color : #FFCC66;" > <TABLE height ="100%" width="100%" border ="0"> <TR> <TD align="center" > <b><i><bean:message key="client.general.informations"/> - <bean:write name="elementClient" property="prenom"/> <bean:write name="elementClient" property="nom"/></i></b> </TD> </TR> <TR> <TD style="text-align: justify;vertical-align: top;"> <bean:message key="client.complement.datenais"/> : <bean:write name="elementClient" property="dateNais"/> </TD> </TR> <TR> <TD style="text-align: justify;vertical-align: top;"> <bean:message key="client.complement.adresse1"/> : <bean:write name="elementClient" property="adresse"/> <logic:notEqual name="elementClient" property="adresse2" value=""> ,  <bean:write name="elementClient" property="adresse2"/> </logic:notEqual> </TD> </TR> <TR> <TD style="text-align: justify;vertical-align: top;"> <bean:message key="client.complement.ville"/> : <bean:write name="elementClient" property="ville"/> </TD> </TR> <TR> <TD style="text-align: justify;vertical-align: top;"> <bean:message key="client.complement.email"/> : <bean:write name="elementClient" property="email"/> </TD> </TR> <TR> <TD align="right"> <html:link forward="saisirModifClient" name="elementClient" property="params" onclick="attente(positionX(), positionY('div'));"> <bean:message key="option.modif.client"/> </html:link> </TD> </TR> </TABLE> </DIV> <bean:write name="elementClient" property="nom"/> </td> <td width="350"> <bean:write name="elementClient" property="prenom"/> </td> </tr> </tbody> </table> </TD> <TD width="100" align="center"> <input type="checkbox" name="ChkSupCli" class="Texte" onclick="javascript:checkCase(this, this.name);" value="<bean:write name='elementClient' property='identifiant'/>" /> </TD> </TR> </logic:iterate> </logic:notEqual> </Table> </body>
Partager