reg1form.java

来自「郭克华j2ee高级框架实战教学视频源代码 这个是比较值得一看的 由郭克华博士」· Java 代码 · 共 121 行

JAVA
121
字号
/*
 * Generated by MyEclipse Struts
 * Template path: templates/java/JavaClass.vtl
 */
package prj8_1.form;

import javax.servlet.http.HttpServletRequest;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;

public class Reg1Form extends ActionForm {
	private String phone;
	private String password;
	private String account;
	private String address;
	private String page;

	public String getPage() {
		return page;
	}

	public void setPage(String page) {
		this.page = page;
	}

	public ActionErrors validate(ActionMapping mapping,
			HttpServletRequest request) {
		if(page.equals("1")){
			if(account.length()==0){
				
			}
			if(password.length()==0){
				
			}
		}
		
		if(page.equals("2")){
			if(phone.length()==0){
				
			}
			if(address.length()==0){
				
			}
		}
		return null;
	}

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

	/** 
	 * Returns the phone.
	 * @return String
	 */
	public String getPhone() {
		return phone;
	}

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

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

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

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

⌨️ 快捷键说明

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