DeptForm.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.dept;
- 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="deptForm"
- */
- public class DeptForm extends ActionForm {
- private String did;
- private String dname;
- private long uno;
- private String dfunction;
- private String dmemo;
- private String dflag;
- private String uname;
- 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.dname == null || this.dname.trim().equals("")) {
- ActionMessage message = new ActionMessage("部门名为空!", false);
- errors.add("dname", message);
- }
- }
- return errors;
- }
- /**
- * Method reset
- * @param mapping
- * @param request
- */
- public void reset(ActionMapping mapping, HttpServletRequest request) {
- this.method = "addlist";
- }
- public String getDflag() {
- return dflag;
- }
- public void setDflag(String dflag) {
- this.dflag = dflag;
- }
- public String getDfunction() {
- return dfunction;
- }
- public void setDfunction(String dfunction) {
- this.dfunction = dfunction;
- }
- public String getDid() {
- return did;
- }
- public void setDid(String did) {
- this.did = did;
- }
- public String getDmemo() {
- return dmemo;
- }
- public void setDmemo(String dmemo) {
- this.dmemo = dmemo;
- }
- public String getDname() {
- return dname;
- }
- public void setDname(String dname) {
- this.dname = dname;
- }
- public String getMethod() {
- return method;
- }
- public void setMethod(String method) {
- this.method = method;
- }
- public long getUno() {
- return uno;
- }
- public void setUno(long uno) {
- this.uno = uno;
- }
- public String getUname() {
- return uname;
- }
- public void setUname(String uname) {
- this.uname = uname;
- }
- }