1 Reply Latest reply on Aug 3, 2007 12:47 PM by Monkey Den

    Password hint - redirect to login

    Monkey Den Master

      On our home page, I have a form for login. User provides username and submits the form to #{loginAction.retrievePassword}

      That method finds the user by username, pulls the password hint and sets it into event scope.

      public String retrievePasswordHint() {
       User user = null;
       User user = userBO.findByUserName(identity.getUsername());
       if (user != null) {
       Contexts.getEventContext().set("passwordHint", user.getPasswordHint());
       } else {
       facesMessages.addToControl("username", FacesMessage.SEVERITY_ERROR, passwordHintError);
       user = null;
       return "login";

      I also have a global navigation rule for the login page:

       <rule if-outcome="login">
       <redirect view-id="/login.xhtml" />

      Any idea of why passwordHint might be empty when login is rendered?