arrameformbean.java
来自「此资源是jsp应用开发 邓子云等编写的一书里的源代码」· Java 代码 · 共 56 行
JAVA
56 行
package formBean;
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;
/**
* @author dengziyun
* 封装输入审批信息表单数据的FormBean
*/
public class arraMeFormBean extends ActionForm{
String thingArraId;//审批ID号
String thingId;//事务ID号
String thingContent;//审批内容
/**
* 重置所有属性的值
*/
public void reset(ActionMapping arg0, HttpServletRequest request) {
thingArraId=null;
thingId=null;
thingContent=null;
}
/**
* 验证表单中的数据
*/
public ActionErrors validate(ActionMapping arg0, HttpServletRequest request) {
ActionErrors errors=new ActionErrors();
//------审批内容非空校验------
if(thingContent==null||thingContent.trim().length()<1)
errors.add("thingContentIsNull",new ActionMessage("thingContentIsNull"));
return errors;
}
public String getThingArraId() {
return thingArraId;
}
public void setThingArraId(String thingArraId) {
this.thingArraId = thingArraId;
}
public String getThingContent() {
return thingContent;
}
public void setThingContent(String thingContent) {
this.thingContent = thingContent;
}
public String getThingId() {
return thingId;
}
public void setThingId(String thingId) {
this.thingId = thingId;
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?