?? 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 + -