Bonjour tt le monde,j'ai combiné jsf avec jquery mobile, mon probeleme est ke quand je navigue de page index.xhtml à valider.xhtml,la deuxieme page ne s'affiche pas,quand je vois le code source via mozilla par exemple,je trouve ke les balises jsf de la page valider. xhtm,ne se transforme pas voilà le code index.xhtml:
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://xmlns.jcp.org/jsf/html">
    <h:head>
        <meta charset="utf-8"/>
        <title>List Appl</title>
        <link rel="stylesheet" href="http://code.jquery.com/mobile/1.1.1/jquery.mobile-1.1.1.min.css"/>
        <h:outputStylesheet library="resources" name="css/style0.css" />
        <script src="http://code.jquery.com/jquery-1.7.1.min.js"> </script>
        <script src="http://code.jquery.com/mobile/1.1.1/jquery.mobile-1.1.1.min.js"></script>
        <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
        <script src="resources/js/javascript.js"></script>
    </h:head>
    <h:body>
       <div data-role="page" id="photos">   
   <header data-role="header" id="hihou" data-theme="b">
            <h1>Liste des étudiants</h1>
        </header>     
  <article data-role="content" >
            <ul data-role="listview" data-filter="true">
                <li>
 
                        <h1>Hicham Chaouki</h1>
                        <h:graphicImage library="resources" name="images/hicham.PNG" class="loup" />
 
                </li>
                <li>
                        <h1>hamza</h1>
                        <h:graphicImage library="resources" name="images/hamza_1.PNG" class="loup" />
 
                </li>
            </ul>
        </article>
 
               <center>
 
    <a href="#{action.naviguer()}" rel="external" data-ajax="false" data-role="button" data-theme="a" data-inline="true">Valider</a>
    <a href="#" data-role="button" data-theme="b" data-inline="true">Annuler</a>
 
</center>
 
          <footer data-role="footer" data-position="fixed">
            <nav data-role="navbar">
                <ul>
                    <li><a href="#" data-icon="home" >Home</a></li>
                    <li><a href="#" data-icon="grid" >Photos</a></li>
                    <li><a href="#" data-icon="info">Info</a></li>
                </ul>
            </nav>
        </footer>
          </div>
    </h:body>
</html>
du valide.xhtml:
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
 
<?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://xmlns.jcp.org/jsf/html">
<h:head> 
<title>Facelet Title</title>
<h:outputStylesheet library="css" name="style0.css" />
<h:outputScript library="javascript" name="jqueryH.js" target="head"/>
<h:outputScript library="javascript" name="javascript.js" target="head"/>
 
 
 
 
</h:head>
<h:body> 
 
 
<h:graphicImage id="etudiant" value="./resources/images/hicham.PNG" onclick=""/>
 
<br/>
<div id="Hicham"> 
<h:outputText value="Hicham Chaouki"/>
</div>
 
 
 
</h:body> 
</html>
du backin Bean:
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
 
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
 
import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;
 
/**
 *
 * @author hicham
 */
@ManagedBean
@SessionScoped
public class action {
 
    /**
     * Creates a new instance of action
     */
    public action() {
    }
    public String naviguer(){
        return "valide.xhtml";
    }
}
du web.xml:
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
 
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
    <context-param>
        <param-name>javax.faces.PROJECT_STAGE</param-name>
        <param-value>Development</param-value>
    </context-param>
    <servlet>
        <servlet-name>Faces Servlet</servlet-name>
        <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
        <servlet-name>Faces Servlet</servlet-name>
        <url-pattern>/faces/*</url-pattern>
    </servlet-mapping>
    <session-config>
        <session-timeout>
            30
        </session-timeout>
    </session-config>
    <welcome-file-list>
        <welcome-file>faces/index.xhtml</welcome-file>
    </welcome-file-list>
</web-app>
est ce que qqn peut m'aider?!