RoleForm.java
资源名称:(J2EE)oa.rar [点击查看]
上传用户:lm2018
上传日期:2015-12-12
资源大小:30449k
文件大小:2k
源码类别:
Jsp/Servlet
开发平台:
Java
- //Created by MyEclipse Struts
- // XSL source (default): platform:/plugin/com.genuitec.eclipse.cross.easystruts.eclipse_4.1.0/xslt/JavaClass.xsl
- package com.oa.module.office.role;
- import javax.servlet.http.HttpServletRequest;
- import org.apache.struts.action.ActionErrors;
- import org.apache.struts.action.ActionForm;
- import org.apache.struts.action.ActionMapping;
- import org.apache.struts.action.ActionMessage;
- /**
- * MyEclipse Struts Creation date: 01-21-2008
- *
- * XDoclet definition:
- *
- * @struts.form name="roleForm"
- */
- public class RoleForm extends ActionForm {
- private long rid;
- private String rname;
- private String rmemo;
- private String method;
- public ActionErrors validate(ActionMapping mapping,
- HttpServletRequest request) {
- ActionErrors errors = new ActionErrors();
- if (this.method != null && this.method.equals("add")
- && this.method.equals("update")) {
- if (this.rname == null || this.rname.trim().equals("")) {
- ActionMessage message = new ActionMessage("角色名为空!", false);
- errors.add("rname", message);
- }
- }
- return errors;
- }
- public void reset(ActionMapping mapping, HttpServletRequest request) {
- this.method = "add";
- }
- public String getMethod() {
- return method;
- }
- public void setMethod(String method) {
- this.method = method;
- }
- public long getRid() {
- return rid;
- }
- public void setRid(long rid) {
- this.rid = rid;
- }
- public String getRmemo() {
- return rmemo;
- }
- public void setRmemo(String rmemo) {
- this.rmemo = rmemo;
- }
- public String getRname() {
- return rname;
- }
- public void setRname(String rname) {
- this.rname = rname;
- }
- }