bonjour ,je suis en cours de réalisation d'une application web avec jsf, spring et richfaces. !
mon problème est que j'ai crée 3 commandButton dont l'action permet d'afficher 3 modelpanel. tout marchait nickel sauf que lorsque j'ai ajouté un menu animé avec javascript, rien ne marche
j'ai testé pas mal de fois , et c'est du à la partie javascript qui permet d'animer mon nouveau menu.

je serais reconnaissante qi quelqu'un pourrait m'aider
Merci d'avance


voici mon code
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
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
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	 xmlns:ui="http://java.sun.com/jsf/facelets"
     xmlns:a4j="http://richfaces.org/a4j"
     xmlns:rich="http://richfaces.org/rich"
      >

                  
<head>
<title>Gestion Client</title>

  </head>

         
<body>

<f:view langue="#{langueBean.langue}">
<ui:composition template="template/common/fond.xhtml">
<ui:define name="menu_global">
<div id="bande">
<img src="../resources/image/bande.png" />
</div>
</ui:define>
<ui:define name="langues">

//mon menu 
	<div class="roll">  
      
            <div class="item"> 
                <a class="link icon_mail"></a> 
                <div class="item_content"> 
                    <h2>Contact us</h2> 
                    <p> 
                        <a >eMail</a> 
                        <a >Twitter</a> 
                        <a >Facebook</a> 
                    </p> 
                </div> 
        
//le code javascript qui , une fois ajouté à la page, bloque l'affichage de mes models panel 
   <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"></script> 
        <script src="../resources/js/jquery-css-transform.js" type="text/javascript"></script> 
        <script src="../resources/js/jquery-animate-css-rotate-scale.js" type="text/javascript"></script> 
        <script> 
            $('.item').hover(
                function(){
                    var $this = $(this);
                    expand($this);
                },
                function(){
                    var $this = $(this);
                    collapse($this);
                }
            );
            function expand($elem){
                var angle = 0;
                var t = setInterval(function () {
                    if(angle == 1440){
                        clearInterval(t);
                        return;
                    }
                    angle += 40;
                    $('.link',$elem).stop().animate({rotate: '+=-40deg'}, 0);
                },10);
                $elem.stop().animate({width:'268px'}, 1000)
                .find('.item_content').fadeIn(400,function(){
                    $(this).find('p').stop(true,true).fadeIn(600);
                });
            }
            function collapse($elem){
                var angle = 1440;
                var t = setInterval(function () {
                    if(angle == 0){
                        clearInterval(t);
                        return;
                    }
                    angle -= 40;
                    $('.link',$elem).stop().animate({rotate: '+=40deg'}, 0);
                },10);
                $elem.stop().animate({width:'52px'}, 1000)
                .find('.item_content').stop(true,true).fadeOut().find('p').stop(true,true).fadeOut();
            }
        </script>	
         </div>
				</div>
</ui:define>




<ui:define name="corps">
   <script type="text/javascript">
	var row;
</script>

<br></br>
<center>
<table style="text-align: center">
<h:form id="ClientForm">
<rich:panel style="border:10;width:720px;">
					<f:facet name="header">
						<h:outputText value="Liste des Clients" />
					</f:facet>
<h:panelGrid columns="1">
<rich:dataTable
    onRowMouseOver="this.style.backgroundColor='#F1F1F1'"
                    onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'"
 id="clientTable" binding="#{clientBean.clientTable}"
				rowKeyVar="row" ajaxKeys="#{clientBean.keys}"
				value="#{clientBean.clientlist}" var="clients" border="4" 
				>
		
		

<rich:column id="type"  filterMethod="#{clientBean.methodFilterType}" filterEvent="onkeyup" width="100px">
					<f:facet name="header">
					  <h:panelGroup>
					
						<h:outputText value="TYPE" />
						<br />
						
		<h:inputText id="type_client" value="#{clientBean.filterType}">
		   <a4j:support event="onkeyup" ignoreDupResponses="true"
			 requestDelay="700" reRender="clientTable" focus="input" />
		</h:inputText>
		</h:panelGroup>		
					</f:facet >
					<h:outputText value="#{clients.clienttype}"/>

</rich:column>


<rich:column id="nom"  filterMethod="#{clientBean.methodFilterNom}" filterEvent="onkeyup" width="100px">
					<f:facet name="header">
					  <h:panelGroup>
					
						<h:outputText value="NOM" />
						<br />
						
		<h:inputText id="nom_client" value="#{clientBean.filterNom}">
		   <a4j:support event="onkeyup" ignoreDupResponses="true"
			 requestDelay="700" reRender="clientTable" focus="input" />
		</h:inputText>
		</h:panelGroup>
		
					</f:facet >
					<h:outputText value="#{clients.nom_Client}"/>

</rich:column>
    
<rich:column id="ville_client" filterMethod="#{clientBean.methodFilterVille}" filterEvent="onkeyup" width="100px">
					<f:facet name="header">
					 <h:panelGroup>
						<h:outputText value="Ville" />
									<br />
						
		<h:inputText value="#{clientBean.filterVille}" id="inputVille">
		   <a4j:support event="onkeyup" ignoreDupResponses="true"
			 requestDelay="10" reRender="clientTable" focus="input" />
		</h:inputText>
		</h:panelGroup>
					</f:facet>
					<h:outputText value="#{clients.ville_Client}"/>
</rich:column>   

<rich:column id="showdetail" width="50px">
					<f:facet name="header">
						<h:outputText value="Détail" />
					</f:facet>
					<a4j:commandButton id="Detail" value="Détail" image="../resources/image/detail.jpg" ajaxSingle="true" reRender="detailPanel" 
						action="#{clientBean.viewDetail}"
						oncomplete="#{rich:component('detailPanel')}.show()">
						<f:setPropertyActionListener value="#{clients.id_Client}"
							target="#{clientBean.idSelect}" />
						<f:setPropertyActionListener value="#{row}"
							target="#{clientBean.currentRow}" />
					</a4j:commandButton>
						<rich:toolTip for="Detail" value="detail" />
</rich:column>




<rich:column id="showmodif" width="50px">
					<f:facet name="header">
						<h:outputText value="Modifier" />
					</f:facet>
					<a4j:commandButton id="modifier" value="Modifier" image="/resources/image/modifier.gif" ajaxSingle="true" reRender="modifPanel" 
						action="#{clientBean.viewDetail}"
						oncomplete="#{rich:component('modifPanel')}.show()">
						<f:setPropertyActionListener value="#{client.id_Client}"
							target="#{clientBean.idSelect}" />
						<f:setPropertyActionListener value="#{row}"
							target="#{clientBean.currentRow}" />
					</a4j:commandButton>
						<rich:toolTip for="modifier" value="modifier" />
					</rich:column>



 				
	 <rich:column id="showdelete"  width="50px" >
					<f:facet name="header">
						<h:outputText value="Supprimer" />
					</f:facet>
					<a4j:commandButton ajaxSingle="true" id="deletelink" reRender="deletePanel" 
						oncomplete="#{rich:component('deletePanel')}.show()"
						  value="Supprimer" image="/resources/image/supprimer.jpg" action="#{clientBean.viewDetail}">
						<f:setPropertyActionListener value="#{clients.id_Client}"
							target="#{clientBean.idSelect}" />
						<f:setPropertyActionListener value="#{row}"
							target="#{clientBean.currentRow}" />
					</a4j:commandButton>
					<rich:toolTip for="deletelink" value="supprimer" />
				</rich:column>
					
					<f:facet name="footer">
<rich:datascroller renderIfSinglePage="true" maxPages="5" />
</f:facet>
</rich:dataTable>
</h:panelGrid> 
</rich:panel>
</h:form>


//mes models panel



<!-- **************************détails Panel ****************************** -->
<rich:modalPanel id="detailPanel" autosized="true" width="160">
<h:form>
			<rich:panel id="foldbox" styleClass="box">
									<f:facet name="header"><h:outputText style="font-weight:bold"  value="Client selectionné :" /></f:facet>
					
					
					
					<h:panelGrid columns="2" cellspacing="3">
						<h:outputText value="adresse:" style="font-weight:bold"></h:outputText>
						<h:outputText value="#{clientBean.clientModif.adresse_Client}"></h:outputText>
						<h:outputText value="codePostal:" style="font-weight:bold"></h:outputText>
						<h:outputText value="#{clientBean.clientModif.codePostal_Client}"></h:outputText>
						<h:outputText value="commentaire:" style="font-weight:bold"></h:outputText>					
						<h:outputText value="#{clientBean.clientModif.commentaire_Client}"></h:outputText>
						<h:outputText value="Email:" style="font-weight:bold"></h:outputText>
						<h:outputText value="#{clientBean.clientModif.email_Client}"></h:outputText>
						
						<h:outputText value="Fax:" style="font-weight:bold"></h:outputText>
						<h:outputText value="#{clientBean.clientModif.fax_Client}"></h:outputText>
						<h:outputText value="Nom:" style="font-weight:bold"></h:outputText>
						<h:outputText value="#{clientBean.clientModif.nom_Client}"></h:outputText>
						<h:outputText value="Ville:" style="font-weight:bold"></h:outputText>
						<h:outputText value="#{clientBean.clientModif.ville_Client}"></h:outputText>
						<h:outputText value="Mode de Reglement:" style="font-weight:bold"></h:outputText>					
						<h:outputText value="#{clientBean.clientModif.modeReglement_Client}"></h:outputText>
						<h:outputText value="TVAintracommunautaire:" style="font-weight:bold"></h:outputText>
						<h:outputText value="#{clientBean.clientModif.TVAintracommunautaire_Client}"></h:outputText>
						
						<h:outputText value="SiteInternet:" style="font-weight:bold"></h:outputText>
						<h:outputText value="#{clientBean.clientModif.siteInternet_Client}"></h:outputText>
						<h:outputText value="Telephone:" style="font-weight:bold"></h:outputText>
						<h:outputText value="#{clientBean.clientModif.telephone_Client}"></h:outputText>
					<h:outputText value="Date derniére modification:" style="font-weight:bold"></h:outputText>
						<h:outputText value="#{clientBean.clientModif.date_modif}"></h:outputText>
					
					</h:panelGrid>
				
					<br></br>
					<br></br>
                   <a4j:keepAlive beanName="clientBean" />
				    <a4j:commandButton value="Fermer"
						onclick="#{rich:component('detailPanel')}.hide();return false;" />
				</rich:panel>
</h:form>

	</rich:modalPanel>

<rich:modalPanel id="modifPanel" autosized="true" width="400">

		<h:form>
			
				<rich:panel id="foldbox" styleClass="box">
					<f:facet name="header"><h:outputText style="font-weight:bold"  value="Client selectionné :" /></f:facet>
					<h:panelGrid columns="2" cellspacing="3">
						
						<h:outputText value="nom :" style="font-weight:bold"></h:outputText>
						<h:inputText value="#{clientBean.clientModif.nom_Client}"></h:inputText>
						<h:outputText value="ville:" style="font-weight:bold"></h:outputText>
						<h:inputText value="#{clientBean.clientModif.ville_Client}"></h:inputText>
					</h:panelGrid>
					<br></br>
					<br></br>
                   <a4j:keepAlive beanName="clientBean" />
					<a4j:commandButton value="Valider" action="#{clientBean.modifierClient}" 
					oncomplete="#{rich:component('modifPanel')}.hide();"
					reRender="clientTable"></a4j:commandButton>
					<a4j:commandButton value="Fermer"
						onclick="#{rich:component('modifPanel')}.hide();return false;" />
				</rich:panel>


					</h:form>

	</rich:modalPanel>



	
	<rich:modalPanel id="deletePanel" autosized="true" width="200">
		<f:facet name="header">
			<h:outputText value="Supprimer ce client?"
				style="padding-right:15px;" />
		</f:facet>
		<f:facet name="controls">
			<h:panelGroup>

				<rich:componentControl for="deletePanel" attachTo="hidelink2"
					operation="hide" event="onclick" />
			</h:panelGroup>
		</f:facet>
		
		<h:form>
			<table width="100%">
				<tbody>
					<tr>
						<td align="center" width="50%">
						<a4j:commandButton value="Oui"
							id="deletebutton"
							ajaxSingle="true" action="#{clientBean.supprimerClient}"
							oncomplete="#{rich:component('deletePanel')}.hide();"
							reRender="clientTable" />
							</td>
						<td align="center" width="50%"><a4j:commandButton value="Non"
							onclick="#{rich:component('deletePanel')}.hide();return false;" />
						</td>
					</tr>
				</tbody>
			</table>
		</h:form>
	</rich:modalPanel> 
</table>
</center>
</ui:define>





<ui:define name="menu"> 
 <div class="green2">
 <div id="slatenav2">
 <ul>
 <h:form>
 <li><h:commandLink ><h:outputText  value="#{message.Consulter}"/> &#xa0;&#xa0;<h:outputText  value="#{message.Clients}"/> </h:commandLink></li>
 <li><h:commandLink><h:outputText  value="#{message.Ajouter}"/> &#xa0;&#xa0; <h:outputText  value="#{message.Client}"/> </h:commandLink></li>
 <li><h:commandLink action="\gestionfidelite.xhtml"><h:outputText  value="#{message.Consulter}"/>&#xa0;&#xa0;<h:outputText  value="#{message.Cartes}"/> </h:commandLink></li>

 </h:form>

 </ul>
 </div>
 </div>
 
 
 
    </ui:define>

<ui:define name="gauche">
<img src="../resources/image/fond_gauche.png" />

</ui:define>

</ui:composition>

</f:view>
</body>
</html>