FileDocCategorySizeDatePackage
UserBean.javaAPI DocExample1333Sun Jun 18 08:59:32 BST 2006com.oreilly.ajax

UserBean

public final class UserBean extends Object
author
steveo

Fields Summary
private String
password
private String
name
Constructors Summary
public UserBean()

    super();
    // TODO Auto-generated constructor stub
  
Methods Summary
public java.lang.StringgetName()

return
Returns the userName.

    return name;
  
public java.lang.StringgetPassword()

return
Returns the password.

    return password;
  
public java.lang.StringloginUser()

      if("myeclipse".equals(getName()) && "myeclipse".equals(getPassword()))
          return "success";
     
      FacesContext facesContext = FacesContext.getCurrentInstance();
      FacesMessage facesMessage = new FacesMessage(
          "You have entered an invalid user name and/or password");
      facesContext.addMessage("loginForm", facesMessage);
     
      return "failure";
  
public voidsetName(java.lang.String userName)

param
userName The userName to set.

    this.name = userName;
  
public voidsetPassword(java.lang.String password)

param
password The password to set.

    this.password = password;