Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » JBoss User Help »

[jboss-user] [JBoss Seam] - h:messages for Authenticator

scott.stark@jboss.org

2007-06-12


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
_______________________________________________
jboss-user mailing list
jboss-user@(protected)
https://lists.jboss.org/mailman/listinfo/jboss-user
©2008 junlu.com - Jax Systems, LLC, U.S.A.