/*
* Generated by MyEclipse Struts
* Template path: templates/java/JavaClass.vtl
*/
package com.yourcompany.struts.form;
import javax.servlet.http.HttpServletRequest;
import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;
import com.sun.corba.se.impl.protocol.giopmsgheaders.Message;
/**
* MyEclipse Struts
* Creation date: 09-11-2008
*
* XDoclet definition:
* @struts.form name="loginForm"
*/
public class LoginForm extends ActionForm {
/*
* Generated fields
*/
/** password property */
private String password;
/** userName property */
private String userName;
/*
* Generated Methods
*/
/**
* Method validate
* @param mapping
* @param request
* @return ActionErrors
*/
public ActionErrors validate(ActionMapping mapping,
HttpServletRequest request) {
// TODO Auto-generated method stub
ActionErrors errors=new ActionErrors();
if(this.userName==null || this.userName.equals(""))
{
ActionError error=new ActionError("login.name.error");
errors.add("userName",error);
}
if(this.password==null || this.password.equals(""))
{
ActionError error=new ActionError("login.password.error");
errors.add("pass",error);
}
return errors;
}
/**
* Returns the password.
* @return String
*/
public String getPassword() {
return password;
}
/**
* Set the password.
* @param password The password to set
*/
public void setPassword(String password) {
this.password = password;
}
/**
* Returns the userName.
* @return String
*/
public String getUserName() {
return userName;
}
/**
* Set the userName.
* @param userName The userName to set
*/
public void setUserName(String userName) {
this.userName = userName;
}
}