📄 projectform.java
字号:
/*
* Generated by MyEclipse Struts
* Template path: templates/java/JavaClass.vtl
*/
package com.support.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: 08-07-2007
*
* XDoclet definition:
* @struts.form name="projectForm"
*/
public class ProjectForm extends ActionForm {
/*
* Generated Methods
*/
private String id;
private int flag;
private String name;
private String description;
private String[] checked;
private int pageNum;
/**
* 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.name == null) return null;
if (this.flag == 1 || this.flag == 5 || this.flag == 4) return null;
if (this.name.trim().length()<1 || this.name.trim().length()>100) {
errors.add("name",new ActionMessage("项目名称须介于1-100之间",false));
}
if (this.description.trim().length()>200) {
errors.add("description",new ActionMessage("项目名称长度须小于100汉字",false));
}
return errors;
}
/**
* Method reset
* @param mapping
* @param request
*/
public void reset(ActionMapping mapping, HttpServletRequest request) {
// TODO Auto-generated method stub
}
public int getFlag() {
return flag;
}
public void setFlag(int flag) {
this.flag = flag;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public String[] getChecked() {
return checked;
}
public void setChecked(String[] checked) {
this.checked = checked;
}
public int getPageNum() {
return pageNum;
}
public void setPageNum(int pageNum) {
this.pageNum = pageNum;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -