FileDocCategorySizeDatePackage
WizardForm.javaAPI DocExample1267Thu Aug 12 21:54:16 BST 2004com.oreilly.strutsckbk.ch08

WizardForm

public class WizardForm extends org.apache.struts.validator.ValidatorForm

Fields Summary
private String
username
private String
password
private String
ssn
Constructors Summary
Methods Summary
public java.lang.StringgetPassword()

        return password;
    
public java.lang.StringgetSsn()

        return ssn;
    
public java.lang.StringgetUsername()

        return username;
    
public voidsetPassword(java.lang.String password)

        this.password = password;
    
public voidsetSsn(java.lang.String ssn)

        this.ssn = ssn;
    
public voidsetUsername(java.lang.String username)

        this.username = username;
    
public org.apache.struts.action.ActionErrorsvalidate(org.apache.struts.action.ActionMapping mapping, javax.servlet.http.HttpServletRequest request)

        ActionErrors errors = super.validate(mapping, request);        
        if (page >= 2) {
            if (username.equals(password)) {
                errors.add( "password", new ActionMessage("password","errors.password.sameAsUsername"));
            }
        }
        return errors;