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

📄 registform.java

📁 网上书店后台管理源码基于struts1.2+oracle数据库
💻 JAVA
字号:

package com.dongfang.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;

/** 
 * MyEclipse Struts
 * Creation date: 09-01-2007
 * 
 * XDoclet definition:
 * @struts.form name="registForm"
 */
public class RegistForm extends ActionForm {
	/*
	 * Generated fields
	 */

	/** password property */
	private String password;

	/** password2 property */
	private String password2;

	/** address property */
	private String address;

	/** username property */
	private String username;

	/** email property */
	private String email;

	/** zip property */
	private String zip;

	/** name property */
	private String name;

	/** tel property */
	private String tel;

	/*
	 * Generated Methods
	 */

	/** 
	 * Method validate
	 * @param mapping
	 * @param request
	 * @return ActionErrors
	 */
	public ActionErrors validate(ActionMapping mapping,
			HttpServletRequest request) {
		// TODO Auto-generated method stub
		ActionErrors errors = new ActionErrors();
		if(username==null||username.equals("")||password==null||password.equals("")||
			email==null||email.equals("")||zip==null||zip.equals("")||
			name==null||name.equals("")||tel.equals("")||tel==null||
			password2.equals("")||password2==null
		)
		{
			errors.add("registErrors", new ActionError("errors.InsertError"));
			
		}
		return errors;
		
	}

	/** 
	 * Method reset
	 * @param mapping
	 * @param request
	 */
	public void reset(ActionMapping mapping, HttpServletRequest request) {
		// TODO Auto-generated method stub
		this.username = null;
		this.password =null;
		this.password2 = null;
		this.email =null;
		this.address = null;
		this.tel = null;
		this.zip =null;
	}

	/** 
	 * 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;
	}

	/** 
	 * Returns the password2.
	 * @return String
	 */
	public String getPassword2() {
		return password2;
	}

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

	/** 
	 * 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 username.
	 * @return String
	 */
	public String getUsername() {
		return username;
	}

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

	/** 
	 * Returns the email.
	 * @return String
	 */
	public String getEmail() {
		return email;
	}

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

	/** 
	 * Returns the zip.
	 * @return String
	 */
	public String getZip() {
		return zip;
	}

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

	/** 
	 * 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;
	}

	/** 
	 * Returns the tel.
	 * @return String
	 */
	public String getTel() {
		return tel;
	}

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

⌨️ 快捷键说明

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