Svp, j'ai une page jsf et je veux réaliser une condition(si action 1 alors page x ) , j'ai utilisé jstl <c:if ></c:if>. Mais elle n'a pas fonctionné .Avez vous une idée comment je peux faire ou comment pouvoir utiliser les conditions dans une page jsf.Voici ce que j'ai essayé de réaliser
La partie view ne s'affiche pas.Y-a t-il une idée.Merci
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 <?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:p="http://primefaces.org/ui"> <h:head> </h:head> <h:body> <h:form> <h:panelGrid border="1"> <p:panel header="Authentification"> <h1> Connectez-vous à votre compte </h1> <f:view> <c:if test="#{loginBean.connecté==false}"> <h:form> <h:panelGrid columns="2"> <h:outputLabel for="login" value="Login"/> <h:inputText id="login" value="#{personnelBean.login}" required="true"/> <h:outputLabel for="password" value="Password"/> <h:inputSecret id="password" value="#{personnelBean.password}" required="true"/> </h:panelGrid> <h:commandButton value="submit" action="#{personnelBean.verify()}" type="submit"/> </h:form> </c:if> <c:if test="#{personnelBean.connecté==true}"> <h2> <h:outputText value="#{personnelBean.message}: #{personnelBean.login}"/> </h2> <h:form> <br/><br/> <h:commandButton value="#{chefprojetBean}"/><br/><br/> <h:commandButton actionListener="#{personnelBean.deconnect()}" value="déconnexion" /> </h:form> </c:if> </f:view> </p:panel> </h:panelGrid> </h:form> </h:body> </html>
Partager