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

📄 userformbean.java

📁 BUG跟踪系统是用来对开发软件时发现的bug进行跟踪。里面包括用户管理模块
💻 JAVA
字号:
package su.bts1.bean;

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;

public class UserFormBean extends ActionForm {

	/**
	 *
	 */
	private static final long serialVersionUID = 1L;

	/*
	 * (non-Javadoc)
	 *
	 * @see org.apache.struts.action.ActionForm#validate(org.apache.struts.action.ActionMapping,
	 *      javax.servlet.http.HttpServletRequest)
	 */
	@SuppressWarnings("deprecation")
	@Override
	public ActionErrors validate(ActionMapping mapping,
			HttpServletRequest request) {
		ActionErrors errors = new ActionErrors();

		if("".equals(this.departID)||this.departID == null){
			errors.add("depID",new ActionError("errors.depID"));
		}

		if ("".equals(this.userName) || this.userName == null) {
			errors.add("usernull", new ActionError("errors.username"));
		}
		if ("".equals(this.password) || this.password == null) {
			errors.add("passwordnull", new ActionError("errors.password"));
		}
		return errors;
	}

	private String departID;

	private String userName;

	private String password;

	/**
	 * @return the departID
	 */
	public String getDepartID() {
		return departID;
	}

	/**
	 * @param departID
	 *            the departID to set
	 */
	public void setDepartID(String departID) {
		this.departID = departID;
	}

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

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

	/**
	 * @return the userName
	 */
	public String getUserName() {
		return userName;
	}

	/**
	 * @param userName
	 *            the userName to set
	 */
	public void setUserName(String userName) {
		this.userName = userName;
	}

}

⌨️ 快捷键说明

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