1 | <!-- Projet Ether - $Id: periode_proprietes.jsp,v 1.2 2002/07/18 12:45:46 pn Exp $ --> |
---|
2 | <html> |
---|
3 | <META HTTP-EQUIV="Cache-Control" content="no-cache"> |
---|
4 | <META HTTP-EQUIV="Pragma" content="no-cache"> |
---|
5 | <META HTTP-EQUIV="Expires" content="Mon, 01 Jan 1990 12:00:00 GMT"> |
---|
6 | |
---|
7 | <%@ page import="fr.alcatel.ether.app.data.*" %> |
---|
8 | <%@ page import="fr.alcatel.ether.tools.*"%> |
---|
9 | <%@ page import="fr.alcatel.ether.app.common.* "%> |
---|
10 | <%@ page import="org.apache.ecs.html.*" %> |
---|
11 | <%@ page import="java.util.Locale" %> |
---|
12 | |
---|
13 | |
---|
14 | <jsp:useBean scope="request" id="periodBean" class = "fr.alcatel.ether.bean.HashMapBean"> |
---|
15 | </jsp:useBean> |
---|
16 | |
---|
17 | <% |
---|
18 | // recuperation de l'index |
---|
19 | // s'il n'existe pas, c'est un creation, sinon, un update |
---|
20 | String param = request.getParameter( Constants.INDEX ); |
---|
21 | TimePeriod period; |
---|
22 | |
---|
23 | if ( param != null ) |
---|
24 | { |
---|
25 | // update |
---|
26 | int id = Integer.valueOf(param).intValue(); |
---|
27 | period = (TimePeriod) periodBean.getElement(id); |
---|
28 | } |
---|
29 | else |
---|
30 | { |
---|
31 | // create |
---|
32 | period = new TimePeriod(); |
---|
33 | } |
---|
34 | %> |
---|
35 | |
---|
36 | <SCRIPT language="JavaScript"> |
---|
37 | |
---|
38 | function fermer() |
---|
39 | { |
---|
40 | window.close(); |
---|
41 | } |
---|
42 | |
---|
43 | function sauver() |
---|
44 | { |
---|
45 | document.periodForm.action = '/ether/servlet/GeoServlet?<%= Config.ACTION %>=<%= Config.PERIOD_UPDATE_VALIDATION %>&<%= Constants.INDEX %>=<%= period.getId() %>' ; |
---|
46 | document.periodForm.target= "_self"; |
---|
47 | document.periodForm.submit(); |
---|
48 | } |
---|
49 | |
---|
50 | </SCRIPT> |
---|
51 | |
---|
52 | <head> |
---|
53 | <title>Propriétés</title> |
---|
54 | <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> |
---|
55 | <link rel="stylesheet" href="/ether/ether.css"></head> |
---|
56 | |
---|
57 | <body background="/images/Ether_Fond1.gif"> |
---|
58 | |
---|
59 | <% if ( period.getId() != -1 ) { %> |
---|
60 | <p class="titrePage" align="center">Propriétés de la période </p> |
---|
61 | <% } else { %> |
---|
62 | <p class="titrePage" align="center">Création d'une période</p> |
---|
63 | <% } %> |
---|
64 | <p class="titrePage" align="center"><%=Config.tag_image_ligne%></p> |
---|
65 | <p class="titrePage" align="center"> </p> |
---|
66 | <form name="periodForm" method="post"> |
---|
67 | <table width="90%" align="center" border="0" cellspacing="0" cellpadding="0"> |
---|
68 | <tr> |
---|
69 | <td width="22%" class="libelleChamp"> |
---|
70 | <p class="petit"><b>Nom</b> </p> |
---|
71 | </td> |
---|
72 | <td width="52%" class="valeurChamp"> |
---|
73 | <input type="text" name="<%= Constants.PERIOD_NAME %>" value="<%= period.getName() %>" maxlength="30" size="30"> |
---|
74 | </td> |
---|
75 | <td width="26%" class="libelleChamp"> </td> |
---|
76 | </tr> |
---|
77 | <tr> |
---|
78 | <td width="22%" class="libelleChamp"> |
---|
79 | <p class="petit"><b>Date début</b> </p> |
---|
80 | </td> |
---|
81 | <td width="52%" class="valeurChamp"> |
---|
82 | <input type="text" name="<%= Constants.PERIOD_FIRST_DATE %>" value="<%= Constants.dateFormatter.format(period.getStartDate()) %>" size="30"> |
---|
83 | </td> |
---|
84 | <td width="26%" class="libelleChamp" rowspan="2" >FORMAT : AAAA/MM/DD ou AAAA/MM/DD HH:MM:SS.SSS</td> |
---|
85 | </tr> |
---|
86 | <tr> |
---|
87 | <td width="22%" class="libelleChamp"> |
---|
88 | <p class="petit"><b>Date fin</b></p> |
---|
89 | </td> |
---|
90 | <td width="52%" class="valeurChamp"> |
---|
91 | <input type="text" name="<%= Constants.PERIOD_LAST_DATE %>" value="<%= Constants.dateFormatter.format(period.getEndDate()) %>" size="30"> |
---|
92 | </td> |
---|
93 | </tr> |
---|
94 | </table> |
---|
95 | <p class="titrePage" align="center"> </p> |
---|
96 | <table width="14%" border="3" cellspacing="0" cellpadding="0" align="center"> |
---|
97 | <tr> |
---|
98 | <td width="78%"> |
---|
99 | <p align="center"><a href="javascript:sauver()"><%= Config.bouton_sauver.toString() %></a></p> |
---|
100 | </td> |
---|
101 | <td width="22%"> |
---|
102 | <p align="center"><a href="javascript:fermer()"><%= Config.bouton_fermer.toString() %></a></p> |
---|
103 | </td> |
---|
104 | </tr> |
---|
105 | </table> |
---|
106 | </form> |
---|
107 | </body> |
---|
108 | </html> |
---|