Affichage de popup selon le resultat du bean
j'ai un formulaire d'authetification ,je veut afficher selon le resultat de mon bean :
1-Authentification est reussit :afficher une popup indiquant que la connection est reussit
2-Echec :afficher une popup indiquant que le mot de passe ou le nom utlisateur est incorrecte
Mon formulaire d'authentification :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
<rich:panel >
<h:form id="LoginForm">
<h:panelGrid id="lpg" columns="2" >
<h:outputText value="Email"/>
<h:inputText id="username" value="#{loginForm.email}" styleClass="inputbox" size="30"/>
<h:outputText value=""/>
<h:message for="username" styleClass="errors"/>
<h:outputText value="Mot de passe" />
<h:inputSecret id="password" value="#{loginForm.password}" styleClass="inputbox" size="30"/>
<h:outputText value=""/>
<h:message for="password" styleClass="errors"/>
<h:panelGrid columns="2" border="0">
<a4j:commandButton value="Login" action="#{loginForm.SimpleAuthenticateUser}" styleClass="submitButton" >
</a4j:commandButton>
<a4j:commandButton value="Annuler" action="Accueil" styleClass="submitButton"/>
</h:panelGrid>
</h:panelGrid>
</h:form>
</rich:panel> |
Mes popup que je souhaite l'afficher :
Code:
1 2 3 4 5 6 7 8 9 10
|
<rich:popupPanel id="statPane" autosized="true" >
Connection reussit
</rich:popupPanel>
<rich:popupPanel id="statPane1" autosized="true" >
Mot de pass ou nom utilisateur est incorrecte
</rich:popupPanel> |