1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- <%@ 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.TextControl,
- 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 size=request.getParameter("size") == null ? "" : request.getParameter("size");
- 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");
- String popup = request.getParameter("popup") == null ? "" : request.getParameter("popup");
- 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();
- TextControl TextControl=new TextControl();
-
- TextControl.setSize(size);
- ReportFieldImpl.setControl(TextControl);
-
- ReportFieldImpl.setName(name);
- ReportFieldImpl.setLabel(label);
- if(!colspan.equals("")){
- ReportFieldImpl.setColspan(colspan);
- }
-
- ReportFieldImpl.setControlType("text");
-
- 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);
- if (popup.equals("1")){
- String max = request.getParameter("max") == null ? "" : request.getParameter("max");
- String min = request.getParameter("min") == null ? "" : request.getParameter("min");
- Validate.setMaxValue(max);
- Validate.setMinValue(min);
- }
- 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);
-
- %>
- <script type="text/javascript">
- var url = window.opener.location.href;
- url = url.replace("sessionReload=true","sessionReload=false");
- window.opener.location.replace(url);
- window.close();
- </script>
- <%}%>
|