📄 registryform.java
字号:
/*
* Generated by MyEclipse Struts
* Template path: templates/java/JavaClass.vtl
*/
package mokoda.form;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
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.validator.ValidatorForm;
/**
* MyEclipse Struts
* Creation date: 12-20-2006
*
* XDoclet definition:
* @struts.form name="registryForm"
*/
public class RegistryForm extends ValidatorForm {
/*
* Generated fields
*/
/** password property */
private String password;
/** again property */
private String again;
/** description property */
private String description;
/** email property */
private String email;
private String inputPath;
/**
* 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 again.
* @return String
*/
public String getAgain() {
return again;
}
/**
* Set the again.
* @param again The again to set
*/
public void setAgain(String again) {
this.again = again;
}
/**
* Returns the description.
* @return String
*/
public String getDescription() {
return description;
}
/**
* Set the description.
* @param description The description to set
*/
public void setDescription(String description) {
this.description = description;
}
/**
* 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;
}
/**
* @return
*/
public String getInputPath() {
return inputPath;
}
public void setInputPath(String inputPath){
this.inputPath = inputPath;
}
public ActionErrors validate(ActionMapping mapping, HttpServletRequest request){
ActionErrors errors = super.validate(mapping, request);
if(!password.equals(again)){
if(errors == null){
errors = new ActionErrors();
}
errors.add("twofields", new ActionError("errors.password.not.match", false));
}
return errors;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -