indexform.java

来自「基于WEB的会议管理系统」· Java 代码 · 共 97 行

JAVA
97
字号
/*
 * Generated by MyEclipse Struts
 * Template path: templates/java/JavaClass.vtl
 */
package com.meet.struts.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: 06-11-2008
 * 
 * XDoclet definition:
 * @struts.form name="indexForm"
 */
public class IndexForm extends ActionForm {
	/*
	 * Generated fields
	 */

	/** key property */
	private String key;

	/** username property */
	private String username;

	/*
	 * Generated Methods
	 */

	/** 
	 * Method validate
	 * @param mapping
	 * @param request
	 * @return ActionErrors
	 */
	public ActionErrors validate(ActionMapping mapping,
			HttpServletRequest request) {
		ActionErrors error=new ActionErrors();
		if(username==null||username.length()==0)
		{
			error.add("username",new ActionError("com.meet.username"));
		}
		if(key==null||key.length()==0)
		{
			error.add("key",new ActionError("com.meet.key"));
		}
		// TODO Auto-generated method stub
		return error;
	}

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

	/** 
	 * Returns the key.
	 * @return String
	 */
	public String getKey() {
		return key;
	}

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

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

⌨️ 快捷键说明

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