⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 addressform.java

📁 客户关系管理系统主要管理新老客户的一些信息并可以发现潜在客户
💻 JAVA
字号:
/** *  */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;import com.qrsx.qrsxcrm.model.Client;import com.qrsx.qrsxcrm.model.User;/** * @author Administrator *  */public class AddressForm extends ActionForm {	public ActionErrors validate(ActionMapping mapping,			HttpServletRequest request) {		ActionErrors errors = new ActionErrors();		if (name == null || name.length() < 1) {			System.out.println("--------执行2------" + name);			errors.add("name", new ActionMessage("addressForm.name.required"));		}		if (telephone == null || telephone.trim().length() < 1) {			System.out.println("--------执行3------" + telephone);			errors.add("telephone", new ActionMessage(					"addressForm.telephone.required"));		}		if (email == null || email.trim().length() < 1) {			System.out.println("--------执行4------" + email);			errors					.add("email", new ActionMessage(							"addressForm.email.required"));		}		if (homeaddress == null || homeaddress.trim().length() < 1) {			System.out.println("--------执行4------" + homeaddress);			errors.add("homeaddress", new ActionMessage(					"addressForm.homeaddress.required"));		}		if (sex == null || sex.trim().length() < 1) {			System.out.println("--------执行4------" + sex);			errors.add("sex", new ActionMessage("addressForm.sex.required"));		}		if (age == null || age.trim().length() < 1) {			errors.add("age", new ActionMessage("addressForm.age.required"));		}		return errors;	}	private String id;	private String name;	private String sex;	private String age;	private String homeaddress;	private String email;	private String qq;	private String telephone;	private User user;	private String userId;	public String getAge() {		return age;	}	public void setAge(String age) {		this.age = age;	}	public String getEmail() {		return email;	}	public void setEmail(String email) {		this.email = email;	}	public String getHomeaddress() {		return homeaddress;	}	public void setHomeaddress(String homeaddress) {		this.homeaddress = homeaddress;	}	public String getName() {		return name;	}	public void setName(String name) {		this.name = name;	}	public String getQq() {		return qq;	}	public void setQq(String qq) {		this.qq = qq;	}	public String getSex() {		return sex;	}	public void setSex(String sex) {		this.sex = sex;	}	public String getTelephone() {		return telephone;	}	public void setTelephone(String telephone) {		this.telephone = telephone;	}	public User getUser() {		return user;	}	public void setUser(User user) {		this.user = user;	}	public String getUserId() {		return userId;	}	public void setUserId(String userId) {		this.userId = userId;	}	public String getId() {		return id;	}	public void setId(String id) {		this.id = id;	}}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -