Salut j'ai un petit problème avec Icefaces, je sais que ça a l'air bizarre mais j'ai un bouton ajouter dans mon application qui au cas où on clique dessus une popup s'affiche avec des champs. tout fonctionne très bien sauf que quand j'ai voulu ajouter l'attribut required à mes inputText la popup ne veut plus s'afficher voici le code de ma JSP Merci de votre aide
Code xml : 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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
<f:view xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ice="http://www.icesoft.com/icefaces/component">
 
	<ice:outputDeclaration doctypeRoot="HTML"
		doctypePublic="-//W3C//DTD HTML 4.01 Transitional//EN"
		doctypeSystem="http://www.w3.org/TR/html4/loose.dtd" />
 
	<html>
	<head>
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
	<title>Gestion des Employes</title>
	<link href="./xmlhttp/css/xp/xp.css" rel="stylesheet" type="text/css" />
	</head>
 
	<body>
	<h2>Gestion Des Employes</h2>
 
	<p>Ici vous pouvez ajouter, supprimer et mettre a jour tous vos
	employes</p>
	<ice:form rendered="true">
		<ice:panelPopup draggable="true" modal="true"
			visible="#{employeBean.vis}" styleClass="panelPopup"
			style="z-index:999; top: 100px; left: 100px; width: 300px; height: 70px; position:absolute; background: #FFFFFF;">
 
			<f:facet name="header">
				<ice:panelGrid id="popupHeader" width="100%" cellpadding="0"
					cellspacing="0" columns="3"
					columnClasses="popupIcon,popupTitle,popupButton"
					style="width:300px; height=20px">
					<h:outputText value="Desole   "
						style="height: 16px;font-weight:bold" />
					<h:commandButton id="popupClose" type="button"
						image="images/close2.gif"
						actionListener="#{employeBean.closePopup}"
						style="cursor: pointer; width: 20px; height: 14px; " />
				</ice:panelGrid>
			</f:facet>
			<f:facet name="body">
				<ice:panelGroup>
					<ice:panelGrid border="1" columns="1"
						style="width:300px; height=50px">
 
						<ice:outputText value="#{employeBean.msg}" />
 
						<ice:commandButton id="modalPnlCloseButton" type="submit"
							value="Ok" actionListener="#{employeBean.closePopup}" />
					</ice:panelGrid>
				</ice:panelGroup>
			</f:facet>
		</ice:panelPopup>
		<ice:panelGrid>
			<ice:setEventPhase events="ValueChangeEvent"
				phase="INVOKE_APPLICATION">
				<ice:dataTable rows="5" id="Employes" var="employe"
					value="#{employeBean.employes}"
					sortAscending="#{employeBean.descending}"
					sortColumn="#{employeBean.columnName}" varStatus="classStatus"
					resizable="true">
					<!-- BooleanCheckBox -->
 
					<ice:column>
						<f:facet name="header">
							<ice:outputText value="Selected" />
						</f:facet>
						<ice:setEventPhase events="ValueChangeEvent"
							phase="INVOKE_APPLICATION">
 
							<ice:selectBooleanCheckbox title="selectionner les employes"
								value="#{employe.selected}" partialSubmit="true"
								valueChangeListener="#{employeBean.selectionnerEmployeAction}">
								<f:attribute name="itemIndex" value="#{classStatus.index}" />
							</ice:selectBooleanCheckbox>
						</ice:setEventPhase>
					</ice:column>
					<!-- ID -->
					<ice:column>
						<!--  <ice:rowSelector value="#{employe.selected}" multiple="single"
						selectionListener="#{employeBean.rowSelectionListener }"
						preStyleOnSelection="true" />-->
						<f:facet name="header">
							<ice:commandSortHeader columnName="ID #" arrow="true">
								<ice:outputText value="ID #" />
							</ice:commandSortHeader>
						</f:facet>
						<ice:outputText value="#{employe.id}" />
					</ice:column>
 
					<!-- Nom -->
					<ice:column>
						<f:facet name="header">
							<ice:commandSortHeader columnName="Nom" arrow="true">
								<ice:outputText value="Nom" />
							</ice:commandSortHeader>
						</f:facet>
						<ice:outputText value="#{employe.nom}" />
					</ice:column>
 
					<!-- Prenom  -->
					<ice:column>
						<f:facet name="header">
							<ice:commandSortHeader columnName="Prenom" arrow="true">
								<ice:outputText value="Prenom" />
							</ice:commandSortHeader>
						</f:facet>
						<ice:outputText value="#{employe.prenom}" />
					</ice:column>
 
					<!-- Date -->
					<ice:column>
						<f:facet name="header">
							<ice:outputText value="Date D'embauche" />
						</f:facet>
						<ice:outputText value="#{employe.date_embauche}" />
					</ice:column>
 
					<!-- Salaire -->
					<ice:column>
						<f:facet name="header">
							<ice:outputText value="Salaire" />
						</f:facet>
						<ice:outputText value="#{employe.salaire}" />
					</ice:column>
					<!-- Fonction -->
					<ice:column>
						<f:facet name="header">
							<ice:commandSortHeader columnName="Fonction" arrow="true">
								<ice:outputText value="Fonction" />
							</ice:commandSortHeader>
						</f:facet>
						<ice:outputText value="#{employe.fonction}" />
					</ice:column>
				</ice:dataTable>
			</ice:setEventPhase>
			<ice:panelGrid rendered="true" border="1" columns="3">
 
				<ice:commandButton value="Ajout"
					actionListener="#{employeBean.addBoutonAction}"></ice:commandButton>
				<ice:commandButton value="Supprimer"
					actionListener="#{employeBean.deleteEmployeAction}"
					panelConfirmation="Delete" onclick="location.reload();"></ice:commandButton>
				<ice:commandButton value="Modifier"
					actionListener="#{employeBean.modifierEmploye}"></ice:commandButton>
			</ice:panelGrid>
		</ice:panelGrid>
		<ice:dataPaginator id="Data_Page" for="Employes" paginator="true"
			fastStep="3" paginatorMaxPages="4">
			<f:facet name="first">
				<ice:graphicImage url="./xmlhttp/css/xp/css-images/arrow-first.gif"
					style="border:none;" title="First Page" />
			</f:facet>
			<f:facet name="last">
				<ice:graphicImage url="./xmlhttp/css/xp/css-images/arrow-last.gif"
					style="border:none;" title="Last Page" />
			</f:facet>
			<f:facet name="previous">
				<ice:graphicImage
					url="./xmlhttp/css/xp/css-images/arrow-previous.gif"
					style="border:none;" title="Previous Page" />
			</f:facet>
			<f:facet name="next">
				<ice:graphicImage url="./xmlhttp/css/xp/css-images/arrow-next.gif"
					style="border:none;" title="Next Page" />
			</f:facet>
			<f:facet name="fastforward">
				<ice:graphicImage url="./xmlhttp/css/xp/css-images/arrow-ff.gif"
					style="border:none;" title="Fast Forward" />
			</f:facet>
			<f:facet name="fastrewind">
				<ice:graphicImage url="./xmlhttp/css/xp/css-images/arrow-fr.gif"
					style="border:none;" title="Fast Backwards" />
			</f:facet>
		</ice:dataPaginator>
		<ice:dataPaginator id="EmpPag" for="Employes" rowsCountVar="rowsCount"
			displayedRowsCountVar="displayedRowsCount"
			firstRowIndexVar="firstRowIndex" lastRowIndexVar="lastRowIndex"
			pageCountVar="pageCount" pageIndexVar="pageIndex">
			<ice:outputFormat
				value="{0} employes trouves, {1} employes affiches, du {2} au {3}. Page {4} / {5}."
				styleClass="standard">
				<f:param value="#{rowsCount}" />
				<f:param value="#{displayedRowsCount}" />
				<f:param value="#{firstRowIndex}" />
				<f:param value="#{lastRowIndex}" />
				<f:param value="#{pageIndex}" />
				<f:param value="#{pageCount}" />
			</ice:outputFormat>
		</ice:dataPaginator>
 
		<ice:panelConfirmation id="Delete" title="Supprimer"
			message="Vous etes sur(e) de vouloir supprimer cet(te) employe(e)"
			acceptLabel="Yes" cancelLabel="No" />
 
 
		<ice:panelPopup draggable="true" modal="true"
			visible="#{employeBean.visible}" styleClass="panelPopup"
			style="z-index:999; top: 100px; left: 100px; width: 400px; height: 200px; position:absolute; background: #FFFFFF;">
			<f:facet name="header">
				<ice:panelGrid id="popupHeader" width="100%" cellpadding="0"
					cellspacing="0" columns="3"
					columnClasses="popupIcon,popupTitle,popupButton"
					style="width:400px; height=40px">
 
					<h:graphicImage id="popupIcon" value="images/icon.jpg"
						style="width: 40px; height: 27px; " />
					<h:outputText value="Maj des employes   "
						style="height: 26px;font-weight:bold" />
					<h:commandButton id="popupClose" type="button"
						image="images/close2.gif"
						actionListener="#{employeBean.closePopup}"
						style="cursor: pointer; width: 30px; height: 24px; " />
				</ice:panelGrid>
			</f:facet>
 
			<f:facet name="body">
				<ice:panelGroup>
					<ice:panelGrid border="1" columns="2" style="width:400px">
						<ice:outputText value="Nom"></ice:outputText>
						<ice:panelGrid border="1" columns="2">
 
							<ice:inputText id="nom" value="#{employeBean.nom}">
								<f:validateLength minimum="3" maximum="25" />
							</ice:inputText>
							<ice:message for="nom" style="color:red" />
						</ice:panelGrid>
						<ice:outputText value="Prenom"></ice:outputText>
						<ice:panelGrid border="1" columns="2">
							<ice:inputText id="prenom" value="#{employeBean.prenom}">
								<f:validateLength minimum="3" maximum="25" />
							</ice:inputText>
							<ice:message for="prenom" style="color:red" />
						</ice:panelGrid>
 
						<ice:outputText value="Salaire"></ice:outputText>
						<ice:panelGrid border="1" columns="2">
							<ice:inputText id="salaire" value="#{employeBean.salaire}"></ice:inputText>
							<ice:message for="salaire" style="color:red" />
						</ice:panelGrid>
 
						<ice:outputText value="Date d'embauche"></ice:outputText>
						<ice:panelGrid border="1" columns="2">
							<ice:selectInputDate id="date"
								value="#{employeBean.date_embauche}" renderAsPopup="true">
								<f:convertDateTime pattern="dd/MM/yyyy" />
							</ice:selectInputDate>
							<ice:message for="date" style="color:red" />
						</ice:panelGrid>
 
						<ice:outputText value="Fonction"></ice:outputText>
						<ice:selectOneMenu onchange="submit()"
							value="#{employeBean.fonction}">
							<f:selectItems value="#{employeBean.fonctions}" />
						</ice:selectOneMenu>
					</ice:panelGrid>
					<ice:panelGrid border="1" columns="4">
						<ice:commandButton value="Ajouter"
							actionListener="#{employeBean.addEmployeAction}"
							visible="#{employeBean.visi}" onclick="location.reload();"></ice:commandButton>
						<ice:commandButton value="Modifier"
							actionListener="#{employeBean.updateEmployeAction}"
							visible="#{employeBean.v}" onclick="location.reload();"></ice:commandButton>
 
						<ice:commandButton value="Cancel"
							actionListener="#{employeBean.closePopup}"
							onclick="location.reload();"></ice:commandButton>
					</ice:panelGrid>
				</ice:panelGroup>
			</f:facet>
		</ice:panelPopup>
 
	</ice:form>
	</body>
	</html>
</f:view>