📄 carform.java
字号:
package com.cargo.crotrol;import org.apache.struts.action.*;import javax.servlet.http.*;import com.cargo.model.Car;import com.cargo.filter.Input;/** * <p>Title: </p> * <p>Description: </p> * <p>Copyright: Copyright (c) 2004</p> * <p>Company: MR</p> * @author BWM * @version 1.0 */public class CarForm extends ActionForm { private int id; private Input in=new Input(); private String shopsign; private String chauffeur; private String area; private String tel; private String resume; private Car car=new Car(); public ActionErrors validate(ActionMapping actionMapping, HttpServletRequest httpServletRequest) { /**@todo: finish this method, this is just the skeleton.*/ ActionErrors errors=new ActionErrors(); if(!in.isNum(car.getTel())) errors.add(Action.ERROR_KEY,new ActionError("error.tel.null")); if(in.isEmpty(car.getShopsign())) errors.add(Action.ERROR_KEY,new ActionError("error.shopsign.null")); if(in.isEmpty(car.getChauffeur())) errors.add(Action.ERROR_KEY,new ActionError("error.chauffeur.null")); return errors; } public void reset(ActionMapping actionMapping, HttpServletRequest httpServletRequest) { car=new Car(); } public int getId() { return car.getId(); } public void setId(int id) { car.setId(id); } public String getShopsign() { return car.getShopsign(); } public void setShopsign(String shopsign) { car.setShopsign(shopsign); } public String getChauffeur() { return car.getChauffeur(); } public void setChauffeur(String chauffeur) { car.setChauffeur(chauffeur); } public String getArea() { return car.getArea(); } public void setArea(String area) { car.setArea(area); } public String getTel() { return car.getTel(); } public void setTel(String tel) { car.setTel(tel); } public String getResume() { return car.getResume(); } public void setResume(String resume) { car.setResume(resume); } public Car getCar() { return car; } public void setCar(Car car) { this.car = car; }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -