h:commandButton et s:button
Salut tout le monde:
voici ma page login :
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
| <?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:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:rich="http://richfaces.org/rich"
xmlns:s="http://jboss.com/products/seam/taglib">
<head>
</style>
<title>Connexion</title>
</head>
<body>
<rich:panel header="Connexion">
<rich:messages/>
<h:form id="login">
<h:panelGrid columns="2">
<h:outputLabel for="username">Utilisateur</h:outputLabel>
<h:inputText id="username" value="#{credentials.username}"/>
<h:outputLabel for="password">Mot de passe</h:outputLabel>
<h:inputSecret id="password" value="#{credentials.password}"/>
<h:commandButton value="Login" action="#{identity.login}" />
<s:button value="SeamLogin" action="#{identity.login}" />
</h:panelGrid>
</h:form>
</rich:panel>
</body>
</html> |
Si j'utilise le bouton "Login" (h:commandButton) tout marche très bien : Si je saisi un nom d'utilisateur et un mot de passe correctement ==> Welcome, user, si non Login failed
Quand j'utilise "SeamLogin" (s:button) je n'arrive plus à me connecter ==> j'ai toujours le message Login failed
Que peut-être le problème?