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

📄 loginform.java

📁 1 系统简介 1.1 系统名称:bugtrail 1.2 适用范围:大型或小型公司 1.3 用途:在项目周期内进行项目管理
💻 JAVA
字号:
/*
 * Generated by MyEclipse Struts
 * Template path: templates/java/JavaClass.vtl
 */
package bugtrail.form;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.*;

/** 
 * MyEclipse Struts
 * Creation date: 12-19-2006
 * 
 * XDoclet definition:
 * @struts.form name="LoginForm"
 */
public class LoginForm extends ActionForm {
	/*
	 * Generated fields
	 */

	/** staffID property */
	private String staffID;

	/** password property */
	private String password;

	/*
	 * Generated Methods
	 */


	/** 
	 * Method reset
	 * @param mapping
	 * @param request
	 */
	public void reset(ActionMapping mapping, HttpServletRequest request) {
		// TODO Auto-generated method stub
	}

	/** 
	 * Returns the staffID.
	 * @return String
	 */
	public String getStaffID() {
		return staffID;
	}

	/** 
	 * Set the staffID.
	 * @param staffID The staffID to set
	 */
	public void setStaffID(String staffID) {
		this.staffID = staffID;
	}

	/** 
	 * Returns the password.
	 * @return String
	 */
	public String getPassword() {
		return password;
	}

	/** 
	 * Set the password.
	 * @param password The password to set
	 */
	public void setPassword(String password) {
		this.password = password;
	}

	/** 
	 * Method validate
	 * @param mapping
	 * @param request
	 * @return ActionErrors
	 */
	@SuppressWarnings({ "deprecation"})
	public ActionErrors validate(ActionMapping mapping,
			HttpServletRequest request) {
		ActionErrors errors = new ActionErrors();
		if(getStaffID().length()<1||!getStaffID().matches("\\d+"))
			errors.add("staffID",new ActionError("id.error"));
		if(getPassword().length()<1)
			errors.add("password",new ActionError("password.null"));
		return errors;
	}
}

⌨️ 快捷键说明

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