Bonjour voilà j'ai trois fichiers xhtml pour afficher une page:
le template MasterLayoutaff.xhtml:
ma page:
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 <?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:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:a4j="http://richfaces.org/a4j" xmlns:rich="http://richfaces.org/rich"> <f:metadata> <f:viewParam name="item" value="#{mysession.id}"> <f:event type="preRenderView" listener="#{mysession.preValidateViewParam}" /> </f:viewParam> </f:metadata> <h:head> <title><ui:insert name="windowTitle"/></title> </h:head> <h:body> <div id="header"> <ui:insert name="headering"> <ui:include src="/composant/header.xhtml"/> </ui:insert> </div> <div id="toolbar"> <ui:insert name="toolbar"> <ui:include src="/composant/toolbar.xhtml"/> </ui:insert> </div> <div id="menu"> <ui:insert name="menu"> <ui:include src="/composant/menu1.xhtml"/> </ui:insert> </div> <div id="content"> <ui:insert name="content"/> </div> <div id="advert"> <ui:insert name="advert"> <ui:include src="/composant/advert.xhtml"/> </ui:insert> </div> <div id="footer"> <ui:insert name="footer"> <ui:include src="/composant/footer.xhtml"/> </ui:insert> </div> </h:body> </html>
mon composant groupe:
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 <?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:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:c="http://java.sun.com/jsp/jstl/core" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:a4j="http://richfaces.org/a4j" xmlns:rich="http://richfaces.org/rich"> <h:head> <title>IGNORED</title> </h:head> <body > <f:view> <ui:composition template="./layout/MasterLayoutaff.xhtml"> <ui:define name="windowTitle"> Ongoladev:#{mysession.curpage} </ui:define> <ui:define name="content"> <ui:include src="groupe.xhtml"/> </ui:define> </ui:composition> </f:view> </body> </html>
Je vous rassure mes chemin sont correct(ma page s'affiche correctement), mais voila mes paramètres ne sont pas passés, je comprend pas pourquoi.
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 <?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:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:a4j="http://richfaces.org/a4j" xmlns:rich="http://richfaces.org/rich"> <h:head> <title>IGNORED</title> </h:head> <body> <ui:composition> </ui:composition> </body> </html>
Au chargement le listener s'exécute mais les paramètres ne sont pas passés.
Votre aide me sera d'un grand secour.
Merci![]()
Partager