[PrimeFaces] Bonton inactif
Bonjour,
Le bouton de ma page ne fonctionne pas (il ne fait rien). j'ai pourtant pris exemple de http://www.coreservlets.com/JSF-Tuto...aces-intro.zip
les messages fonctionnent bien, mais le bouton rien !
Voila ma page login.xhtml
Code:
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
| <?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:c="http://java.sun.com/jsp/jstl/core"
xmlns:p="http://primefaces.org/ui">
<h:head>
<title>PrimeFaces Test</title>
</h:head>
<h:body>
<p:growl widgetVar="growl" showDetail="true" />
<h:form>
<p:panel header="Connexion">
<h:panelGrid columns="2" cellpadding="5" align="center">
<h:outputText value="#{msg[loginUserForm.txtEmail]}" />
<p:inputText id="email" value="#{loginUserForm.identh}" required="true"/>
<h:outputText value="#{msg[loginUserForm.txtMotDePasse]}" />
<p:password id="motdepasse" value="#{loginUserForm.motdepasse}" required="true" />
</h:panelGrid>
<p:commandButton action="#{loginUserForm.buttonAction}" value="#{msg[loginUserForm.txtBtValider]}" styleClass="ui-priority-primary" icon="ui-icon-disk" />
</p:panel>
</h:form>
</h:body>
</html> |
le code de la classe LoginUserForm:
Code:
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
| package com.site.forms.login;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;
@ManagedBean
@SessionScoped
public class LoginUserForm {
private String identh;
private String motdepasse;
private String txtEmail;
private String txtMotDePasse;
private String txtBtValider;
public LoginUserForm(){
txtEmail="form.email";
txtMotDePasse="form.passwdPrompt";
txtBtValider="form.submitText";
}
public String buttonAction() {
System.out.println("button");
return("show-test-data");
}
public String getIdenth() {
return identh;
}
public void setIdenth(String email) {
this.identh = email;
}
public String getMotdepasse() {
return motdepasse;
}
public void setMotdepasse(String motdepasse) {
this.motdepasse = motdepasse;
}
public String getTxtEmail() {
return txtEmail;
}
public void setTxtEmail(String txtEmail) {
this.txtEmail = txtEmail;
}
public String getTxtMotDePasse() {
return txtMotDePasse;
}
public void setTxtMotDePasse(String txtMotDePasse) {
this.txtMotDePasse = txtMotDePasse;
}
public String getTxtBtValider() {
return txtBtValider;
}
public void setTxtBtValider(String txtBtValider) {
this.txtBtValider = txtBtValider;
}
} |
merci d'avance.