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

📄 rfcform.java

📁 建立于Eclipse平台的WEB应用系统-物流管理系统变更模块
💻 JAVA
字号:
/*
 * Generated by MyEclipse Struts
 * Template path: templates/java/JavaClass.vtl
 */
package org.mychange.struts.form;


import java.io.UnsupportedEncodingException;

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;
import org.mychange.ValidTime;
import org.mychange.obj.Users;

/** 
 * MyEclipse Struts
 * Creation date: 07-03-2008
 * 
 * XDoclet definition:
 * @struts.form name="rfcForm"
 */
public class RfcForm extends ActionForm {
	/*
	 * Generated fields
	 */
	
	private int action;

	/** type property */
	private String type;
	
	private int id;
	private String contace1; // 联系方式
	
	private String contact2;
//	
//	private String back;

	
	private String uploadFile;
	
	/** description property */
	private String description;

	/** submitDate property */
	private String submitDate;

	/** priority property */
	private String priority;

	/** expectDate property */
	private String expectDate;
	
	/** expectDate property */
	private String RFCname;
	
	private String waitingTime;
	
	/** expectDate property */
	private String launcher;
	
	/** expectDate property */
	private String follower;
	
	/** expectDate property */
	private String risk;
	
	/** expectDate property */
	private String  money;
	
	/** expectDate property */
	private String effection;
	
	/** expectDate property */
	private String people;
	
	/** expectDate property */
	private String technology;
	
	/** expectDate property */
	private String emergence;
	
	/** submit property*/
	private String rollBack;
	
	private String pass;
	


	public String getPass() {
		return pass;
	}

	public void setPass(String pass) {
		this.pass = pass;
	}

	public String getRollBack() {
		return rollBack;
	}

	public void setRollBack(String rollBack) {
		this.rollBack = rollBack;
	}


	/** 
	 * 数据验证
	 * @param mapping
	 * @param request
	 * @return ActionErrors
	 */
	
	public ActionErrors validate(ActionMapping mapping,
			HttpServletRequest request) {
		ActionErrors errors= new ActionErrors();
		

		action = Integer.parseInt(request.getParameter("action"));
		
		if(action==0)
		{
		   if(this.getRFCname()==null||this.getRFCname().length()<1)
		   {
			   errors.add("RFCname", new ActionMessage("NotNull.error"));
		   }
		   else if(!this.getRFCname().matches("^[a-zA-Z0-9\u4e00-\u9fa5]+$")){
			   errors.add("RfcName", new ActionMessage("bytesOnly.error"));
		   }
		   else if(this.getSubmitDate()==null||this.getSubmitDate().length()<1)
		   {
			   errors.add("submitDate", new ActionMessage("NotNull.error"));
			  
		   }
		   else if(!ValidTime.checkDate(this.getSubmitDate())){
			   errors.add("submitDate", new ActionMessage("Datetype"));
		   } else if(!ValidTime.checkDate(this.getExpectDate())){
			   errors.add("expectDate", new ActionMessage("Datetype"));
		   }
		   else if(this.getDescription()==null||this.getDescription().length()<1){
			  errors.add("descriptiontext", new ActionMessage("NotNull.error"));
		   }
		   		   
		   return errors;
		}
//		
//		if(action==2)
//		{
//			  if(!( this.getRisk().equals("高")||this.getRisk().equals("中")||this.getRisk().equals("低")) ){
//				   errors.add("risk", new ActionMessage("risktype"));
//			   }
//			   else if(!( this.getPriority().equals("最高")||this.getPriority().equals("高")||this.getPriority().equals("一般")||this.getPriority().equals("低")) ){
//				   errors.add("priority", new ActionMessage("prioritytype"));
//			   } 
//			   else if(!( this.getEffection().equals("重要")||this.getEffection().equals("实质")||this.getEffection().equals("次要")) ){
//				   errors.add("effection", new ActionMessage("effectiontype"));
//			   }
//			   else if(!( this.getEmergence().equals("高")||this.getEmergence().equals("中")||this.getEmergence().equals("低")) ){
//				   errors.add("emergence", new ActionMessage("emergencetype"));
//			   }
//			  
//			  return errors;
//		}
		
		return null;
				
	}

	/** 
	 * Method reset
	 * @param mapping
	 * @param request
	 */
	public void reset(ActionMapping mapping, HttpServletRequest request) {
		// TODO Auto-generated method stub
		
		try {
			request.setCharacterEncoding("gb2312");
		} catch (UnsupportedEncodingException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
	/*
	 * Generated Methods
	 */

	public String getEffection() {
		return effection;
	}

	public void setEffection(String effection) {
		this.effection = effection;
	}

	public String getEmergence() {
		return emergence;
	}

	public void setEmergence(String emergence) {
		this.emergence = emergence;
	}

	public String getFollower() {
		return follower;
	}

	public void setFollower(String follower) {
		this.follower = follower;
	}

	public String getLauncher() {
		return launcher;
	}

	public void setLauncher(String launcher) {
		this.launcher = launcher;
	}

	public String getMoney() {
		return money;
	}

	public void setMoney(String money) {
		this.money = money;
	}

	public String getPeople() {
		return people;
	}

	public void setPeople(String people) {
		this.people = people;
	}

	public String getRFCname() {
		
		return RFCname;
	}
	

	public void setRFCname(String rfcNname) {
		
		RFCname = rfcNname.replaceAll(" ", "");
		
	}

	public String getRisk() {
		return risk;
	}

	public void setRisk(String risk) {
		this.risk = risk;
	}

	public String getTechnology() {
		return technology;
	}

	public void setTechnology(String technology) {
		this.technology = technology;
	}

	
	public String getType() {
		return type;
	}

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

	/** 
	 * Returns the description.
	 * @return String
	 */
	public String getDescription() {
		return description;
	}

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

	/** 
	 * Returns the submitDate.
	 * @return String
	 */
	public String getSubmitDate() {
		return submitDate;
	}

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

	/** 
	 * Returns the priority.
	 * @return String
	 */
	public String getPriority() {
		return priority;
	}

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

	/** 
	 * Returns the expectDate.
	 * @return String
	 */
	public String getExpectDate() {
		return expectDate;
	}

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


	public String getUploadFile() {
		return this.uploadFile;
	}

	public void setUploadFile(String uploadFile) {
		this.uploadFile = uploadFile;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}




//	public String getBack() {
//		return back;
//	}
//
//	public void setBack(String back) {
//		this.back = back;
//	}

	public String getContace1() {
		return contace1;
	}

	public void setContace1(String contace1) {
		this.contace1 = contace1;
	}

	public String getContact2() {
		return contact2;
	}

	public void setContact2(String contact2) {
		this.contact2 = contact2;
	}

	public String getWaitingTime() {
		return waitingTime;
	}

	public void setWaitingTime(String waitingTime) {
		this.waitingTime = waitingTime;
	}

	/** 
	 * Returns the type.
	 * @return String
	 */
}


⌨️ 快捷键说明

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