?? regform.java
字號:
/*
* Generated by MyEclipse Struts
* Template path: templates/java/JavaClass.vtl
*/
package com.ascent.struts.form;
import javax.servlet.http.HttpServletRequest;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionMessage;
/**
* MyEclipse Struts Creation date: 07-07-2007
*
* XDoclet definition:
*
* @struts.form name="regForm"
*/
public class RegForm extends ActionForm {
/*
* Generated fields
*/
/** password property */
private String password;
/** email property */
private String email;
/** repassword property */
private String repassword;
/** cust_name property */
private String cust_name;
/** flag property */
private int flag;
/*
* Generated Methods
*/
/**
* Method validate
*
* @param mapping
* @param request
* @return ActionErrors
*/
public ActionErrors validate(ActionMapping mapping,
HttpServletRequest request) {
ActionErrors errors = new ActionErrors();
if (cust_name == null || cust_name == "") {
errors.add("cust_name", new ActionMessage(
"error.cust_name.required"));
} else if (cust_name.length() < 6) {
errors
.add("cust_name", new ActionMessage(
"error.cust_name.length"));
} else if (password == null || password == "" || repassword == null
|| repassword == "") {
errors.add("password", new ActionMessage("error.pass.required"));
} else if (password.length() < 6) {
errors.add("password", new ActionMessage("error.password.length"));
} else if (!password.equals(repassword)) {
errors.add("pass", new ActionMessage("error.pass.notequal"));
} else if (email == null || email == "") {
errors.add("email", new ActionMessage("error.email.required"));
}
return errors;
}
/**
* Method reset
*
* @param mapping
* @param request
*/
public void reset(ActionMapping mapping, HttpServletRequest request) {
// TODO Auto-generated method stub
}
/**
* 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 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 repassword.
*
* @return String
*/
public String getRepassword() {
return repassword;
}
/**
* Set the repassword.
*
* @param repassword
* The repassword to set
*/
public void setRepassword(String repassword) {
this.repassword = repassword;
}
/**
* Returns the cust_name.
*
* @return String
*/
public String getCust_name() {
return cust_name;
}
/**
* Set the cust_name.
*
* @param cust_name
* The cust_name to set
*/
public void setCust_name(String cust_name) {
this.cust_name = cust_name;
}
public int getFlag() {
return flag;
}
public void setFlag(int flag) {
this.flag = flag;
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -