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

📄 editpassform.java

📁 一个完整的物流系统
💻 JAVA
字号:
package jp.com.cost.login.web.form;

import javax.servlet.http.HttpServletRequest;

import jp.com.cost.common.DataCheckor;

import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionMessage;

public class EditPassForm extends ActionForm {

	/*
	 * (non-Javadoc)
	 * 
	 * @see org.apache.struts.action.ActionForm#validate(org.apache.struts.action.ActionMapping,
	 *      javax.servlet.http.HttpServletRequest)
	 */
	@Override
	public ActionErrors validate(ActionMapping mapping,
			HttpServletRequest request) {
		// TODO Auto-generated method stub
		ActionErrors errors = new ActionErrors();
		DataCheckor DC = new DataCheckor();
		if (DC.isNull(aid)) {
			errors.add("aiderror", new ActionMessage("error.EditPassForm.aid"));
		}
		if (DC.isNull(oldpass)||!oldpass.equals(password)) {
			errors.add("oldpasserror", new ActionMessage(
					"error.EditPassForm.oldpass"));
		}
		if (DC.isNull(newpass1)||newpass1.length()<6||newpass1.length()>25) {
			errors.add("newpass1", new ActionMessage(
					"error.EditPassForm.newpass1"));
		}
		if (DC.isNull(newpass2)) {
			errors.add("newpass2", new ActionMessage(
					"error.EditPassForm.newpass2"));
		}
		if (!newpass1.equals(newpass2)) {
			errors.add("differpass", new ActionMessage(
					"error.EditPassForm.differpass"));
		}

		return errors;
	}

	/** aid property */
	private String aid;
	/** password property */
	private String password;
	/** oldpass property */
	private String oldpass;
	/** apass1 property */
	private String newpass1;
	/** apass2 property */
	private String newpass2;

	/**
	 * @return the aid
	 */
	public String getAid() {
		return aid;
	}

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

	/**
	 * @return the oldpass
	 */
	public String getOldpass() {
		return oldpass;
	}

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

	/**
	 * @return the newpass1
	 */
	public String getNewpass1() {
		return newpass1;
	}

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

	/**
	 * @return the newpass2
	 */
	public String getNewpass2() {
		return newpass2;
	}

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

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

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

}

⌨️ 快捷键说明

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