Bonsoir,
j'ai un problème que je ne sais résoudre car il me manque des outils et je n'arrive pas à en trouver. Je créé une fonction de modification d'emploi du tems.
Je m'explique:
Je lance une page jsp grâce à une action modif, dans cette page j'ai en paramètre mon bean : modif, qui contient les paramètres jour, heure, semaine, idedt...
Dans ma page jsp j'ai un bouton submit qui va me rediriger vers un actionForm, où j'ai déja mis de getter pr les paramètres ci-dessus.
Voici le code de ma jsp:
Alors ma question est la suivante:
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 <%@ page language="java" %> <%@taglib uri="http://struts.apache.org/tags-html" prefix="html" %> <%@taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %> <%@taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %> <html> <head> <STYLE TYPE="text/css"> @import url(./style.css); </STYLE> </script> <script language="JavaScript"> function setHiddenEdt(value){document.change.hidden.value=value;} </script> </head> <body> <div ID="bordure"> <html:form action="change"> <TABLE width="100%" cellpadding=0 cellspacing=0 border=0 RULES="group" bgcolor=#4C7ABC > <TR> <TD width="100%" height=60 valign="middle" align="center"> <h1>MODIFICATION</h1> </TD> </TR> <table border=0 width="100%" valign="top" align="center" bgcolor=#B8CCE5 ID="bordure"> <tr > <td align="right" width=33%> <h2>Semaine: <input property="semaine" value="<bean:write name="modif" property="semaine"/>"/></h2> </td> <td align="center" width=33%> <h2>Jour: <bean:write name="modif" property="jour"/></h2> </td> <td align="left" width=33%> <h2>Heure: <bean:write name="modif" property="heure"/></h2> </td> </tr> </table> <table border=0 width="100%" valign="top" align="center" bgcolor=#B8CCE5 ID="bordure"> <tr> <td align="right" width=50%> <h2>Patient:</h2> </td> <td align="left" width=50%> <h2> <html:select property="noss"> <html:option value=""/> <logic:present name="Patients"> <logic:iterate id="Patients" name="Patients"> <bean:define id ="nom" name="Patients" property="nom"/> <bean:define id ="prenom" name="Patients" property="prenom"/> <bean:define id ="noss" name="Patients" property="noss"/> <html:option value="${noss}"> <bean:write name="Patients" property="nom"/> <bean:write name="Patients" property="prenom"/></html:option> </logic:iterate> </logic:present> </html:select> </h2> </td> </tr> <tr> <bean:define id ="jour" name="modif" property="jour"/> <jsp:useBean id="change" scope="session" class="camedel.ChangeEdtForm"/> <jsp:setProperty name="change" property="jour" value="${jour}"/> <html:hidden property="hidden" value="default"/> <td align="right" width=50%> <html:submit onclick="setHiddenEdt('add');">Ajouter</html:submit> </td> <td align="left" width=50%> <html:submit onclick="setHiddenEdt('delete');">Annuler</html:submit> </td> </tr> </table> </TABLE> </html:form> </div> </html>
Comment puis-je faire pour faire passer en paramètres ds mon bean : change, les paramètres que j'ai dans mon bean : modif. Ceci sans les afficher dans ma page...?
Bon je suis pas sur du tout d'avoir été clair...
Si quelqu'un avez la patience d'essayer de me comprendre et de me répondre ce serait vraiment gentil!!!
Partager