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

📄 groupform.java

📁 老外的在线考试
💻 JAVA
字号:
/* * CyberTester - J2EE Web application for creating, delivering and managing tests/exams/surveys.  * Copyright (C) 2004 CyberDemia Research and Services Pty Ltd * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program (see the file COPYING); if not, write to the * Free Software Foundation, Inc., * 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA * * See the COPYING file located in the top-level-directory of * the archive of this program for complete text of license. */package com.cyberdemia.cybertester.admin.user;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;import com.cyberdemia.cybertester.CyberTesterUtils;import com.cyberdemia.cybertester.admin.AdminConstants;import com.cyberdemia.user.UserData;/** *  * GroupForm is a Struts ActionForm to send, receive and validate values from the  * group editor form. *   * @version $Revision: 1.4 $ at $Date: 2004/06/05 14:58:07 $ by $Author: alexycyap $ * @author Alexander Yap */public final class GroupForm extends ActionForm{	public Integer getId()	{		return m_id;	}	public void setId(Integer id)	{		m_id = id;	}	public String getName()	{		return m_name;	}	public void setName(String name)	{		m_name = name.trim();	}	public String getMode()	{		return m_mode;	}	public void setMode(String mode)	{		m_mode = mode;	}	public boolean isNew()	{		return AdminConstants.EDITOR_NEW_MODE.equalsIgnoreCase(m_mode);	}		public void setUsers(UserData[] users)	{		m_users = users;	}		public UserData[] getUsers()	{		return m_users;	}		public void setSearchTarget(String target)	{ 		m_userSearchTarget = target;	}		public String getSearchTarget()	{		return m_userSearchTarget;	}	/**	* Reset all properties to their default values.	*	* @param mapping The mapping used to select this instance	* @param request The servlet request we are processing	*/	public void reset(ActionMapping mapping, HttpServletRequest request)	{		m_id = null;		m_name = null;		m_mode = AdminConstants.EDITOR_NEW_MODE;		m_users = null;		m_userSearchTarget = "";	}	public ActionErrors validate(ActionMapping mapping, HttpServletRequest request)	{		ActionErrors errors = new ActionErrors();		if ((m_id==null)&&(!AdminConstants.EDITOR_NEW_MODE.equals(m_mode)))			errors.add("id", new ActionError("error.group.id.missing"));		CyberTesterUtils.validateRequiredFormEnteredParam("Name", m_name, errors);		return errors;	}	private Integer m_id = null;	private String m_name = null;	private String m_mode=AdminConstants.EDITOR_NEW_MODE;	private String m_userSearchTarget = "";	private UserData[] m_users = null;		}

⌨️ 快捷键说明

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