1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- <%@ page contentType="text/html; charset=UTF-8" language="java" %>
- <%@ page language="java"
- import="java.util.*,com.sysmodel.listmodel.xmlmodel.impl.FormListImpl,
- com.sysmodel.listmodel.xmlmodel.impl.QueryFieldImpl,
- com.sysmodel.xformmodel.importcontrol.TextControl,
- com.sysmodel.listmodel.xmlmanager.xmlobjdll.ListModeldllImpl,
- com.sysmodel.xformmodel.impl.ValidateImpl"%>
- <%
- 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 action = request.getParameter("action") == null ? "" : request.getParameter("action");
- String readonly = request.getParameter("readonly") == null ? "" : request.getParameter("readonly");
- String maxlength = request.getParameter("maxlength") == null ? "" : request.getParameter("maxlength");
- String dojoInuptType = request.getParameter("dojoInuptType") == null ? "" : request.getParameter("dojoInuptType");
- String regxValue = request.getParameter("regxValue") == null ? "" : request.getParameter("regxValue");
- 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.setControlType("text");
- queryField.setLabel(label);
- queryField.setOperator(operator);
- TextControl TextControl=new TextControl();
- ValidateImpl Validate = new ValidateImpl();
- Validate.setRegxValue(regxValue);
- Validate.setDojoType(dojoInuptType);
- Validate.setMaxLength(maxlength);
- TextControl.setReadOnly(new Boolean(readonly).booleanValue());
- TextControl.setSize(size);
- queryField.setValidate(Validate);
- queryField.setControl(TextControl);
- 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>
- <%}%>
|