checi_insertzhandianform.java
来自「java做的 公交车查询系统....毕业设计」· Java 代码 · 共 78 行
JAVA
78 行
//在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_insertZhanDianForm extends ActionForm{
private static final long serialVersionUID = 1L;
private int checihao=0;
private String journey=null;
private String zhandianming=null;
private int index=0;
public checi_insertZhanDianForm(){
}
public void setChecihao(int checihao){
this.checihao=checihao;
}
public int getChecihao(){
return checihao;
}
public void setJourney(String journey){
this.journey=journey;
}
public String getJourney(){
return journey;
}
public void setZhandianming(String zhandianming){
this.zhandianming=zhandianming;
}
public String getZhandianming(){
return zhandianming;
}
public void setIndex(int index){
this.index=index;
}
public int getIndex(){
return index;
}
public void reset(ActionMapping mapping,
HttpServletRequest request) {
this.checihao=0;
this.journey=null;
this.zhandianming=null;
this.index=0;
}
public ActionErrors validate(ActionMapping mapping,
HttpServletRequest request) {
ActionErrors errors = new ActionErrors();
if (checihao == 0 || zhandianming==null
||zhandianming.equals("") || index==0 ||journey==null
||journey.equals("")){
errors.add(ActionErrors.GLOBAL_MESSAGE,
new ActionMessage(""));
}
return errors;
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?