FileDocCategorySizeDatePackage
WizardForm.javaAPI DocExample1073Thu Jun 10 02:55:56 BST 2004com.oreilly.strutsckbk.ch05

WizardForm

public class WizardForm extends ActionForm

Fields Summary
private int
page
private String
username
private String
password
Constructors Summary
Methods Summary
public intgetPage()

		return page;
	
public java.lang.StringgetPassword()

		return password;
	
public java.lang.StringgetUsername()

		return username;
	
public voidsetPage(int page)

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

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

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

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