[jboss-user] [JBoss Seam] - Password hint - redirect to login

monkeyden do-not-reply at jboss.com
Fri Aug 3 12:45:25 EDT 2007


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:

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

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

Thanks

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4070727#4070727

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4070727



More information about the jboss-user mailing list