But it's still a global message, not "for" your loginPanel. Either remove the "for" and display your global messages, or use facesMessage.addToControl() in the code.
"tonylmai" wrote : You're right.
|
| However, after I've added a panel with id for the message, it's still not displayed.
|
| <a4j:outputPanel id="loginPanel">
| | <h:panelGrid rendered="#{! empty facesContext.maximumSeverity}">
| | <h:messages for="loginPanel" styleClass="message" />
| | </h:panelGrid>
|
| Is there anything that I could have erred that caused this message to be dropped after the Authenticator.authenticate() method called?
|
| Thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4053765#4053765
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4053765
You're right.
However, after I've added a panel with id for the message, it's still not displayed.
<a4j:outputPanel id="loginPanel">
| <h:panelGrid rendered="#{! empty facesContext.maximumSeverity}">
| <h:messages for="loginPanel" styleClass="message" />
| </h:panelGrid>
Is there anything that I could have erred that caused this message to be dropped after the Authenticator.authenticate() method called?
Thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4053762#4053762
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4053762
Hello all,
I am trying to display a customized error message should the authenticate method failed to authenticate a user. I.e.
@Name("authenticator")
| public class Authenticator {
| @In
| private FacesMessages facesMessages;
| ...
| public boolean authenticate() {
| try {
| ...
| } catch (AuthenticationException e) {
| facesMessages.add("#{res['login.failed.msg']}");
| return false;
| }
However, this message is not showing when the authenticate method failed. The login.xml page is coded as followed:
<h:panelGrid rendered="#{! empty facesContext.maximumSeverity}">
| <h:messages for="dialog" styleClass="message" />
| </h:panelGrid>
Any idea?
Thanks for your help.
-tony
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4053755#4053755
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4053755