%@ page contentType="text/html; charset=UTF-8" language="java" %>
<%@ page language="java"
import="java.util.*,
com.sysmodel.collectmodel.xmlmodel.impl.FormCollectionImpl,
com.sysmodel.collectmodel.xmlmodel.impl.ReportFieldImpl,
com.sysmodel.xformmodel.importcontrol.TextAreaControl,
com.sysmodel.collectmodel.xmlmanager.xmlobjdll.CollectModeldllImpl,
com.sysmodel.xformmodel.impl.ValidateImpl"%>
<%
String pageid=request.getParameter("pageid")==null ? "0" : request.getParameter("pageid");
String action=request.getParameter("action")==null ? " " : request.getParameter("action");
String oname=request.getParameter("oname") == null ? "" : request.getParameter("oname");
String label=request.getParameter("label") == null ? "" : request.getParameter("label");
String colspan=request.getParameter("colspan") == null ? "" : request.getParameter("colspan");
String maxlengths=request.getParameter("maxlengths") == null ? "" : request.getParameter("maxlengths");
String name=request.getParameter("name") == null ? "" : request.getParameter("name");
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 need = request.getParameter("need") == null ? "false" : request.getParameter("need");
String trime = request.getParameter("trime") == null ? "false" : request.getParameter("trime");
String dojoInuptType = request.getParameter("dojoInuptType") == null ? "" : request.getParameter("dojoInuptType");
FormCollectionImpl FormCollection =null;
if(session.getAttribute("FormCollect"+pageid) == null){
return;
} else {
FormCollection=(FormCollectionImpl)session.getAttribute("FormCollect"+pageid);
ArrayList ReportFields=FormCollection.getAllReportFields();
ReportFieldImpl ReportFieldImpl=new ReportFieldImpl();
CollectModeldllImpl CollectModeldllImpl=new CollectModeldllImpl();
TextAreaControl TextAreaControl=new TextAreaControl();
ReportFieldImpl.setControl(TextAreaControl);
ReportFieldImpl.setName(name);
ReportFieldImpl.setLabel(label);
if(!colspan.equals("")){
ReportFieldImpl.setColspan(colspan);
}
ReportFieldImpl.setControlType("textarea");
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.setMaxLength(maxlengths);
Validate.setDojoType(dojoInuptType);
ReportFieldImpl.setValidate(Validate);
if(action.equals("add")){
ReportFields.add(ReportFieldImpl);
}else if(action.equals("edit")){
CollectModeldllImpl.updateReportField(FormCollection,ReportFieldImpl,oname);
}
session.setAttribute("FormCollect"+pageid,FormCollection);
%>
<%}%>