📄 usersform.java
字号:
/*
* Generated by MyEclipse Struts
* Template path: templates/java/JavaClass.vtl
*/
package com.zjy.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 org.apache.struts.action.ActionMessage;
import org.apache.struts.action.ActionMessages;
/**
* MyEclipse Struts
* Creation date: 04-06-2007
*
* XDoclet definition:
* @struts.form name="usersForm"
*/
public class UsersForm extends ActionForm {
/*
* Generated fields
*/
private int id;
private String oldpw;
/** password property */
private String password;
/** sex property */
private String sex;
/** adds property */
private String adds;
/** age property */
private String age;
/** resetpw property */
private String resetpw;
/** email property */
private String email;
/** name property */
private String name;
private String yzm;
/*
* 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(name==null||name.length()<1){
errors.add("name",new ActionError("namewrong"));
}
if(password==null||password.length()<1){
errors.add("password",new ActionError("passwordwrong"));
}
if(!password.equals(resetpw)){
errors.add("resetpw",new ActionError("resetpasswordwrong"));
}
return errors;
}
/**
* Method reset
* @param mapping
* @param request
*/
public void reset(ActionMapping mapping, HttpServletRequest request) {
// TODO Auto-generated method stub
sex="男";
age="*";
adds="*";
email="*";
}
/**
* 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 sex.
* @return String
*/
public String getSex() {
return sex;
}
/**
* Set the sex.
* @param sex The sex to set
*/
public void setSex(String sex) {
this.sex = sex;
}
/**
* Returns the adds.
* @return String
*/
public String getAdds() {
return adds;
}
/**
* Set the adds.
* @param adds The adds to set
*/
public void setAdds(String adds) {
this.adds = adds;
}
/**
* Returns the age.
* @return String
*/
public String getAge() {
return age;
}
/**
* Set the age.
* @param age The age to set
*/
public void setAge(String age) {
this.age = age;
}
/**
* Returns the resetpw.
* @return String
*/
public String getResetpw() {
return resetpw;
}
/**
* Set the resetpw.
* @param resetpw The resetpw to set
*/
public void setResetpw(String resetpw) {
this.resetpw = resetpw;
}
/**
* Returns the email.
* @return String
*/
public String getEmail() {
return email;
}
/**
* Set the email.
* @param email The email to set
*/
public void setEmail(String email) {
this.email = email;
}
/**
* Returns the name.
* @return String
*/
public String getName() {
return name;
}
/**
* Set the name.
* @param name The name to set
*/
public void setName(String name) {
this.name = name;
}
public void setYzm(String yzm) {
this.yzm = yzm;
}
public String getYzm() {
return yzm;
}
public void setOldpw(String oldpw) {
this.oldpw = oldpw;
}
public String getOldpw() {
return oldpw;
}
public void setId(int id) {
this.id = id;
}
public int getId() {
return id;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -