%@ page contentType="text/html; charset=UTF-8" language="java" %>
<%@ page language="java"
import="com.sysmodel.collectmodel.xmlmodel.able.FormCollection,
com.sysmodel.collectmodel.xmlmodel.impl.ReportFieldImpl,
com.sysmodel.xformmodel.importcontrol.DateControl,
com.sysmodel.xformmodel.impl.ValidateImpl,
com.sysmodel.collectmodel.xmlmodel.impl.PageBodyImpl,
com.sysmodel.collectmodel.xmlmanager.xmlobjdll.CollectModeldllImpl"%>
<%
String pageid = request.getParameter("pageid") == null ? "" : request.getParameter("pageid");
String label = request.getParameter("label") == null ? "" : request.getParameter("label");
String name = request.getParameter("name") == null ? "" : request.getParameter("name");
String colspan = request.getParameter("colspan") == null ? "" : request.getParameter("colspan");
String size = request.getParameter("size") == null ? "" : request.getParameter("size");
String need = request.getParameter("need") == null ? "false" : request.getParameter("need");
String trime = request.getParameter("trime") == null ? "false" : request.getParameter("trime");
String format = request.getParameter("format") == null ? "" : request.getParameter("format");
String action = request.getParameter("action") == null ? "" : request.getParameter("action");
String oName = request.getParameter("oName") == null ? "" : request.getParameter("oName");
String regxValue = request.getParameter("regxValue") == null ? "" : request.getParameter("regxValue");
String invalidMessage = request.getParameter("invalidMessage") == null ? "" : request.getParameter("invalidMessage");
String promptMessage = request.getParameter("promptMessage") == null ? "" : request.getParameter("promptMessage");
String dojoInuptType = request.getParameter("dojoInuptType") == null ? "" : request.getParameter("dojoInuptType");
FormCollection FormCollection = null;
if(session.getAttribute("FormCollect"+pageid) == null ){
return;
} else {
FormCollection = (FormCollection)session.getAttribute("FormCollect"+pageid);
ReportFieldImpl ReportFieldImpl = new ReportFieldImpl();
ReportFieldImpl.setLabel(label) ;
ReportFieldImpl.setName(name);
ReportFieldImpl.setControlType("date");
if(!colspan.equals("")){
ReportFieldImpl.setColspan(colspan);
}
DateControl DateControl = new DateControl();
DateControl.setFormat(format);
DateControl.setSize(size);
ReportFieldImpl.setControl(DateControl);
ValidateImpl Validate = new ValidateImpl();
Validate.setNeed(new Boolean(need).booleanValue());
Validate.setTrim(new Boolean(trime).booleanValue());
Validate.setRegxValue(regxValue);
Validate.setPromptMessage(promptMessage);
Validate.setInvalidMessage(invalidMessage);
Validate.setDojoType(dojoInuptType);
ReportFieldImpl.setValidate(Validate);
CollectModeldllImpl CollectModeldllImpl = new CollectModeldllImpl();
if(action.equals("add")){
PageBodyImpl PageBodyImpl = (PageBodyImpl)FormCollection.getPageBody();
PageBodyImpl.addReportField(ReportFieldImpl);
}else if(action.equals("edit")){
CollectModeldllImpl.updateReportField(FormCollection , ReportFieldImpl , oName);
}
session.setAttribute("FormCollect"+pageid , FormCollection);
%>
<%} %>