a0bc0e91ae2f001d15b3d293b7672d16
来自「客户关系管理系统主要管理新老客户的一些信息并可以发现潜在客户」· 代码 · 共 98 行
TXT
98 行
/**
*
*/
package com.qrsx.qrsxcrm.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;
/**
* @author Administrator
*
*/
public class DeptForm extends ActionForm
{
private String id; //主键
private String deptName; //部门名称
private String deptId; //部门编号
private String description; //部门描述
/**
* FORM表单验证
*/
public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
ActionErrors errors = new ActionErrors();
if((deptName == null)||(deptName.length()<1)){
//errors.add(ActionErrors.GLOBAL_MESSAGE,new ActionMessage("error.loginName.required"));
errors.add("deptName",new ActionMessage("部门名称不能为空!"));
}
if((deptId == null)||(deptId.length()<1)){
//errors.add(ActionErrors.GLOBAL_MESSAGE,new ActionMessage("error.password.required"));
errors.add("deptId",new ActionMessage("部门编号不能为空!"));
}
// if( age!=null && age.trim().length()>0 ){
// try{
// Integer.valueOf(age);
// }catch(Exception e){
// //errors.add(ActionErrors.GLOBAL_MESSAGE,new ActionMessage("error.age.integer"));
// errors.add("age",new ActionMessage("error.age.integer"));
// }
// }
return errors;
}
/**
* @return the deptId
*/
public String getDeptId() {
return deptId;
}
/**
* @param deptId the deptId to set
*/
public void setDeptId(String deptId) {
this.deptId = deptId;
}
/**
* @return the deptName
*/
public String getDeptName() {
return deptName;
}
/**
* @param deptName the deptName to set
*/
public void setDeptName(String deptName) {
this.deptName = deptName;
}
/**
* @return the description
*/
public String getDescription() {
return description;
}
/**
* @param description the description to set
*/
public void setDescription(String description) {
this.description = description;
}
/**
* @return the id
*/
public String getId() {
return id;
}
/**
* @param id the id to set
*/
public void setId(String id) {
this.id = id;
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?