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

📄 adminform.java

📁 我的智囊团,学习三种框架很好的源码包含分页.
💻 JAVA
字号:
/*
 * Generated by MyEclipse Struts
 * Template path: templates/java/JavaClass.vtl
 */
package org.lxh.myzngt.struts.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;

/**
 * MyEclipse Struts Creation date: 07-03-2007
 * 
 * XDoclet definition:
 * 
 * @struts.form name="adminForm"
 */
public class AdminForm extends ActionForm {
	/*
	 * Generated fields
	 */

	/** adminpwd property */
	private String adminpwd;

	private String confirmpwd;

	/** adminid property */
	private String adminid;

	/** id property */
	private String id;

	private String checkcode;
	
	private String oldpwd ;

	private int type;

	// 1:表示增加操作
	// 2:表示删除操作
	// 3:表示登陆
	// 4:表示修改密码

	/*
	 * Generated Methods
	 */

	/**
	 * Method validate
	 * 
	 * @param mapping
	 * @param request
	 * @return ActionErrors
	 */
	public ActionErrors validate(ActionMapping mapping,
			HttpServletRequest request) {
		ActionErrors errors = new ActionErrors();
		if (type == 1) {
			if (this.adminid == null || "".equals(this.adminid)) {
				errors.add("adminid", new ActionMessage("admin.adminid.null"));
			}
			if (this.adminpwd == null || "".equals(this.adminpwd)) {
				errors.add("adminid", new ActionMessage("admin.adminpwd.null"));
			} else {
				if (!(this.adminpwd.equals(this.confirmpwd))) {
					errors.add("confirmpwd", new ActionMessage(
							"admin.confirmpwd.error"));
				}
			}
			if (this.checkcode == null || "".equals(this.checkcode)) {
				errors.add("checkcode", new ActionMessage("checkcode.null"));
			}
		}
		if (type == 2) {
			if (this.adminid == null || "".equals(this.adminid)) {
				errors.add("adminid", new ActionMessage("admin.adminid.null"));
			}
		}
		if (type == 3) {
			if (this.adminid == null || "".equals(this.adminid)) {
				errors.add("adminid", new ActionMessage("admin.adminid.null"));
			}
			if (this.adminpwd == null || "".equals(this.adminpwd)) {
				errors.add("adminid", new ActionMessage("admin.adminpwd.null"));
			}
			if (this.checkcode == null || "".equals(this.checkcode)) {
				errors.add("checkcode", new ActionMessage("checkcode.null"));
			}
		}
		if (type == 4) {
			if (this.oldpwd == null || "".equals(this.oldpwd)) {
				errors.add("oldpwd", new ActionMessage("admin.oldpwd.null"));
			}
			if (this.adminpwd == null || "".equals(this.adminpwd)) {
				errors.add("adminid", new ActionMessage("admin.adminpwd.null"));
			} else {
				if (!(this.adminpwd.equals(this.confirmpwd))) {
					errors.add("confirmpwd", new ActionMessage(
							"admin.confirmpwd.error"));
				}
			}
			if (this.checkcode == null || "".equals(this.checkcode)) {
				errors.add("checkcode", new ActionMessage("checkcode.null"));
			}
		}
		return errors;
	}

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

	/**
	 * Returns the adminpwd.
	 * 
	 * @return String
	 */
	public String getAdminpwd() {
		return adminpwd;
	}

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

	/**
	 * Returns the adminid.
	 * 
	 * @return String
	 */
	public String getAdminid() {
		return adminid;
	}

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

	/**
	 * Returns the id.
	 * 
	 * @return String
	 */
	public String getId() {
		return id;
	}

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

	public String getCheckcode() {
		return checkcode;
	}

	public void setCheckcode(String checkcode) {
		this.checkcode = checkcode;
	}

	public int getType() {
		return type;
	}

	public void setType(int type) {
		this.type = type;
	}

	public String getConfirmpwd() {
		return confirmpwd;
	}

	public void setConfirmpwd(String confirmpwd) {
		this.confirmpwd = confirmpwd;
	}

	public String getOldpwd() {
		return oldpwd;
	}

	public void setOldpwd(String oldpwd) {
		this.oldpwd = oldpwd;
	}
}

⌨️ 快捷键说明

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