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

📄 infoform.java

📁 Eclipse编程技术与实例一书的附CD-ROM光盘
💻 JAVA
字号:
// Created by Xslt generator for Eclipse.// XSL :  not found (java.io.FileNotFoundException:  (No such file or directory))// Default XSL used : easystruts.jar$org.easystruts.xslgen.JavaClass.xslpackage app.form;import javax.servlet.http.HttpServletRequest;import org.apache.struts.action.ActionError;import org.apache.struts.action.ActionErrors;import org.apache.struts.action.ActionForm;import org.apache.struts.action.ActionMapping;/**  * InfoForm.java created by EasyStruts - XsltGen. * http://easystruts.sf.net * created on 08-04-2005 *  * XDoclet definition: * @struts:form name="infoForm" */public class InfoForm extends ActionForm {	// --------------------------------------------------------- Instance Variables	/** birth_year property */	private String birth_year;	/** address property */	private String address;	/** birth_month property */	private String birth_month;	/** graduate_school property */	private String graduate_school;	/** name property */	private String name;	// --------------------------------------------------------- Methods	/** 	 * Method validate	 * @param ActionMapping mapping	 * @param HttpServletRequest request	 * @return ActionErrors	 */	public ActionErrors validate(		ActionMapping mapping,		HttpServletRequest request) {		ActionErrors errors = new ActionErrors();		if (name == null || name.trim().length() == 0)			errors.add("name", new ActionError("name.error"));		return errors;	}	public void reset(ActionMapping mapping, HttpServletRequest request) {		name = "";		birth_year = "1986";		birth_month = "1";		address = "";		graduate_school = "";	}	/** 	 * Returns the birth_year.	 * @return String	 */	public String getBirth_year() {		return birth_year;	}	/** 	 * Set the birth_year.	 * @param birth_year The birth_year to set	 */	public void setBirth_year(String birth_year) {		this.birth_year = birth_year;	}	/** 	 * Returns the address.	 * @return String	 */	public String getAddress() {		return address;	}	/** 	 * Set the address.	 * @param address The address to set	 */	public void setAddress(String address) {		this.address = address;	}	/** 	 * Returns the birth_month.	 * @return String	 */	public String getBirth_month() {		return birth_month;	}	/** 	 * Set the birth_month.	 * @param birth_month The birth_month to set	 */	public void setBirth_month(String birth_month) {		this.birth_month = birth_month;	}	/** 	 * Returns the graduate_school.	 * @return String	 */	public String getGraduate_school() {		return graduate_school;	}	/** 	 * Set the graduate_school.	 * @param graduate_school The graduate_school to set	 */	public void setGraduate_school(String graduate_school) {		this.graduate_school = graduate_school;	}	/** 	 * Returns the name.	 * @return String	 */	public String getName() {		return name;	}	/** 	 * Set the name.	 * @param name The name to set	 */	public void setName(String name) {		this.name = name;	}}

⌨️ 快捷键说明

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