5 Replies Latest reply on Mar 20, 2007 7:05 AM by Tony Herstell

    FacesMessage not appearing....

    Tony Herstell Master


      public class AuthenticationControllerImpl implements AuthenticationController, Serializable {
       private EntityManager em;
       @In(create = true)
       private LoggedInUser loggedInUser;
       @In(create = true)
       private transient FacesMessages facesMessages;
       private Log log;
       EncryptionController encryptionController;
       public boolean authenticate() {
       boolean valueToBeReturned = false;
       log.info("Starting authentication for " + Identity.instance().getUsername() + ".");
       try {
       User matchedUser = (User) em.createQuery(
       "from User u where u.username = :username")
       .setParameter("username", Identity.instance().getUsername())
       // Found the User.
       log.info("Found User => " + matchedUser);
       // Now check the Password
       log.info("Password from Dabase:" + matchedUser.getPassword());
       log.info("Password from Screen:" + Identity.instance().getPassword());
       if ((encryptionController.decrypt(matchedUser.getPassword())).equals(Identity.instance().getPassword())) {
       // Add any roles
       if (matchedUser.getRoles() != null)
       for (UserRole eachUserRole : user.getRoles())
       valueToBeReturned = true;
       } else {
       log.info("Failed on Password Check.");
       facesMessages.addFromResourceBundle("loginAttempt", "login_error_password_incorrect");
       } catch (NoResultException nre) {
       // Failure
       log.info("Failed on Username Check.");
       facesMessages.addFromResourceBundle("loginAttempt", "login_error_user_unknown");
       return valueToBeReturned;

      when the username fails I get the request to add the message "login_error_user_unknown" added to some task thing inside Seam code.

      I never get to see the message on the screen.

      Where do I go to see what happens in the task thing.

      This used to work and now doesn't... and I havent changed it.

      Now on Seam 1.2.0 Patch 1 and IceFaces 1.0.6 DR#1

      The xhtml the message is getting pushed into:
      <ice:panelGrid columns="2" rendered="#{!(identity.loggedIn) and !(loggedInUser.currentlyRegistering)}" >
       <ice:commandButton id="loginAttempt" type="submit" value="#{messages.button_login}" action="#{identity.login}">
       <s:conversationPropagation type="none"/>
       <s:button type="submit" value="#{messages.button_register}" immediate="true" action="#{userRegistrationController.startRegistration}">
       <s:conversationPropagation type="none"/>

      Any ideas?