1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- <%@ page contentType="text/html; charset=UTF-8" language="java" %>
- <%@ page language="java"
- import="java.util.*,
- com.sysmodel.listmodel.xmlmodel.impl.FormListImpl,
- com.sysmodel.xformmodel.importcontrol.DateControl,
- com.sysmodel.listmodel.xmlmodel.impl.QueryFieldImpl,
- com.sysmodel.xformmodel.impl.ValidateImpl,
- com.sysmodel.listmodel.xmlmanager.xmlobjdll.ListModeldllImpl
- "%>
- <%
- String listid = request.getParameter("listid") == null ? "" : request.getParameter("listid");
- String classid = request.getParameter("classid") == null ? "0" : request.getParameter("classid");
- String dataName = request.getParameter("dataName") == null ? "" : request.getParameter("dataName");
- String label = request.getParameter("label") == null ? "" : request.getParameter("label");
- String operator = request.getParameter("operator") == null ? "" : request.getParameter("operator");
- String size = request.getParameter("size") == null ? "" : request.getParameter("size");
- String format = request.getParameter("format") == null ? "" : request.getParameter("format");
- String action = request.getParameter("action") == null ? "" : request.getParameter("action");
- String regxValue = request.getParameter("regxValue") == null ? "" : request.getParameter("regxValue");
- String dojoInuptType = request.getParameter("dojoInuptType") == null ? "" : request.getParameter("dojoInuptType");
- String invalidMessage = request.getParameter("invalidMessage") == null ? "" : request.getParameter("invalidMessage");
- String promptMessage = request.getParameter("promptMessage") == null ? "" : request.getParameter("promptMessage");
-
- System.out.println("listid="+listid);
- System.out.println("classid="+classid);
- System.out.println("dataName="+dataName);
- System.out.println("label="+label);
- System.out.println("operator="+operator);
- System.out.println("size="+size);
- System.out.println("format="+format);
- System.out.println("action="+action);
- FormListImpl FormList = null;
- if(session.getAttribute("FormList"+listid) == null){
- return;
- } else {
- FormList = (FormListImpl)session.getAttribute("FormList"+listid);
- QueryFieldImpl queryField = new QueryFieldImpl();
- queryField.setClassid(Integer.parseInt(classid));
- queryField.setDataName(dataName);
- queryField.setLabel(label);
- queryField.setOperator(operator);
- queryField.setControlType("date");
- DateControl DateControl = new DateControl();
- DateControl.setSize(size);
- DateControl.setFormat(format);
- queryField.setControl(DateControl);
-
- ValidateImpl Validate = new ValidateImpl();
- Validate.setRegxValue(regxValue);
- Validate.setDojoType(dojoInuptType);
- Validate.setPromptMessage(promptMessage);
- Validate.setInvalidMessage(invalidMessage);
- queryField.setValidate(Validate);
-
- if(action.equals("add")){
- ArrayList QueryFields=FormList.getQueryFields();
- QueryFields.add(queryField);
- FormList.setQueryFields(QueryFields);
- }else if(action.equals("edit")){
- String oDataName = request.getParameter("oDataName") == null ? "" : request.getParameter("oDataName");
- String oLabel = request.getParameter("oLabel") == null ? "" : request.getParameter("oLabel");
- ListModeldllImpl ListModeldllImpl=new ListModeldllImpl();
- ListModeldllImpl.updateQueryField(FormList,queryField,oDataName,oLabel);
- }
- session.setAttribute("FormList"+listid,FormList);
- %>
-
- <% }%>
- <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>
|