ddf364e1c8e2b14f8ae2ae2adbb39ca0b766b9aa.svn-base 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <%@ page contentType="text/html; charset=UTF-8" language="java" %>
  2. <%@ page language="java"
  3. import="java.util.*,com.sysmodel.listmodel.xmlmodel.impl.FormListImpl,
  4. com.sysmodel.listmodel.xmlmodel.impl.QueryFieldImpl,
  5. com.sysmodel.xformmodel.importcontrol.TextControl,
  6. com.sysmodel.listmodel.xmlmanager.xmlobjdll.ListModeldllImpl,
  7. com.sysmodel.xformmodel.impl.ValidateImpl"%>
  8. <%
  9. String listid = request.getParameter("listid") == null ? "" : request.getParameter("listid");
  10. String classid = request.getParameter("classid") == null ? "0" : request.getParameter("classid");
  11. String dataName = request.getParameter("dataName") == null ? "" : request.getParameter("dataName");
  12. String label = request.getParameter("label") == null ? "" : request.getParameter("label");
  13. String operator = request.getParameter("operator") == null ? "" : request.getParameter("operator");
  14. String size = request.getParameter("size") == null ? "" : request.getParameter("size");
  15. String action = request.getParameter("action") == null ? "" : request.getParameter("action");
  16. String readonly = request.getParameter("readonly") == null ? "" : request.getParameter("readonly");
  17. String maxlength = request.getParameter("maxlength") == null ? "" : request.getParameter("maxlength");
  18. String dojoInuptType = request.getParameter("dojoInuptType") == null ? "" : request.getParameter("dojoInuptType");
  19. String regxValue = request.getParameter("regxValue") == null ? "" : request.getParameter("regxValue");
  20. FormListImpl FormList = null;
  21. if(session.getAttribute("FormList"+listid) == null){
  22. return;
  23. } else {
  24. FormList = (FormListImpl)session.getAttribute("FormList"+listid);
  25. QueryFieldImpl queryField = new QueryFieldImpl();
  26. queryField.setClassid(Integer.parseInt(classid));
  27. queryField.setDataName(dataName);
  28. queryField.setControlType("text");
  29. queryField.setLabel(label);
  30. queryField.setOperator(operator);
  31. TextControl TextControl=new TextControl();
  32. ValidateImpl Validate = new ValidateImpl();
  33. Validate.setRegxValue(regxValue);
  34. Validate.setDojoType(dojoInuptType);
  35. Validate.setMaxLength(maxlength);
  36. TextControl.setReadOnly(new Boolean(readonly).booleanValue());
  37. TextControl.setSize(size);
  38. queryField.setValidate(Validate);
  39. queryField.setControl(TextControl);
  40. if(action.equals("add")){
  41. ArrayList QueryFields = FormList.getQueryFields();
  42. QueryFields.add(queryField);
  43. FormList.setQueryFields(QueryFields);
  44. }else if(action.equals("edit")){
  45. String oDataName = request.getParameter("oDataName") == null ? "" : request.getParameter("oDataName");
  46. String oLabel = request.getParameter("oLabel") == null ? "" : request.getParameter("oLabel");
  47. ListModeldllImpl ListModeldllImpl=new ListModeldllImpl();
  48. ListModeldllImpl.updateQueryField(FormList,queryField,oDataName,oLabel);
  49. }
  50. session.setAttribute("FormList"+listid,FormList);
  51. %>
  52. <script type="text/javascript">
  53. var url = window.opener.location.href;
  54. url = url.replace("sessionReload=true","sessionReload=false");
  55. window.opener.location.replace(url);
  56. window.close();
  57. </script>
  58. <%}%>