apzl_leasing/WebContent/Frame/page/ow/RequiredRuleUpdator.jsp
2023-09-26 18:30:22 +08:00

32 lines
1.2 KiB
Plaintext

<%@ page language="java" contentType="text/html;charset=GBK" %><%@
page import="java.sql.*"%><%@ page import="java.util.*"%><%@
page import="com.amarsoft.are.ARE"%><%@
page import="com.amarsoft.awe.control.model.*"%><%@
page import="com.amarsoft.awe.dw.*"%><%@
page import="com.amarsoft.awe.dw.ui.validator.*"%><%@
page import="com.amarsoft.awe.util.*"%><%
/*
本类用于更新必输项验证
*/
String sDataObject = request.getParameter("DataObject");
String sColName = request.getParameter("ColName");
String[] vColName=sColName.split(",");
String sRequired = request.getParameter("Required");
boolean bRequired = "1".equals(sRequired);
try{
ASDataObject asObj = Component.getDataObject(sDataObject);
for(int i=0;i<vColName.length;i++){
asObj.setRequired(vColName[i], bRequired);
}
//刷新验证规则
IValidateRulesFactory factory = new DefaultValidateRulesFactory(asObj);
asObj.validateRules = factory.getValidateRules();
//重新序列化dataobject
ObjectConverts.saveObject(new java.io.File(Component.getDWTmpPath(asObj.getSerializableName())), asObj);
out.print(sDataObject);
}catch(Exception e){
//e.printStackTrace();2018/07/08 by zhulh 找不到校验文件没啥好大惊小怪的
ARE.getLog().error(e.getMessage());
//out.print("fail:"+ e.toString());
}
%>