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

📄 checi_modifycheciform.java

📁 java做的 公交车查询系统....毕业设计
💻 JAVA
字号:
//在checi.jsp页面中,获取修改车次表单中数据
package gongjiaochexitong.gongjiaoche.checi_pkg;

import org.apache.struts.action.ActionForm;

import org.apache.struts.action.ActionMapping;
import javax.servlet.http.HttpServletRequest;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionMessage;

public class checi_modifyCheCiForm extends ActionForm{
	
	private static final long serialVersionUID = 1L;
	private int checihao=0;
	private String type=null;
	private String startTime=null;
	private String endTime=null;
	private String startStation=null;
	private String endStation=null;
	
	public checi_modifyCheCiForm(){
		
	}

	public int getChecihao() {
		return checihao;
	}

	public void setChecihao(int checihao) {
		this.checihao = checihao;
	}

	public String getEndStation() {
		return endStation;
	}

	public void setEndStation(String endStation) {
		this.endStation = endStation;
	}

	public String getEndTime() {
		return endTime;
	}

	public void setEndTime(String endTime) {
		this.endTime = endTime;
	}

	public String getStartStation() {
		return startStation;
	}

	public void setStartStation(String startStation) {
		this.startStation = startStation;
	}

	public String getStartTime() {
		return startTime;
	}

	public void setStartTime(String startTime) {
		this.startTime = startTime;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}
	
	public void reset(ActionMapping mapping,
			HttpServletRequest request) {
			this.checihao=0;
			this.type=null;
			this.startTime=null;
			this.endTime=null;
			this.endStation=null;
			this.startStation=null;
	}
	
	public ActionErrors validate(ActionMapping mapping,
			HttpServletRequest request) {
			ActionErrors errors = new ActionErrors();
			
			if (checihao == 0 || type==null  
					||type.equals("") || startTime==null 
					||startTime.equals("") || endTime.equals("") 
					||endTime==null||startStation==null 
					||startStation.equals("")||endStation==null 
					||endStation.equals("")){
				errors.add(ActionErrors.GLOBAL_MESSAGE,
					new ActionMessage(""));                       
			}		
			
			return errors;
	}

}

⌨️ 快捷键说明

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