【Java开源代码栏目提醒】:网学会员--在 Java开源代码编辑为广大网友搜集整理了:arraMeFormBean.java绩等信息,祝愿广大网友取得需要的信息,参考学习。
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;
}
}