tierExc.jsp 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. <%@ page contentType="text/html; charset=UTF-8" language="java" %>
  2. <%@ page language="java"
  3. import="java.util.*,
  4. com.sysmodel.listmodel.xmlmodel.impl.FormListImpl,
  5. com.sysmodel.listmodel.xmlmodel.impl.ListFieldImpl,
  6. com.sysmodel.listmodel.xmlmanager.xmlobjdll.ListModeldllImpl"%>
  7. <%
  8. String listid = request.getParameter("listid") == null ? "" : request.getParameter("listid");
  9. String action = request.getParameter("action") == null ? "" : request.getParameter("action");
  10. ListFieldImpl ListFieldImpl = new ListFieldImpl();
  11. String showType = request.getParameter("showType") == null ? "" : request.getParameter("showType");
  12. String width = request.getParameter("width") == null ? "" : request.getParameter("width");
  13. String url = request.getParameter("url") == null ? "" : request.getParameter("url");
  14. String target = request.getParameter("target") == null ? "" : request.getParameter("target");
  15. String popup = request.getParameter("popup") == null ? "" : request.getParameter("popup");
  16. width = new StringBuffer(width).append("%").toString();
  17. ListFieldImpl.setShowType(showType);
  18. ListFieldImpl.setWidth(width);
  19. ListFieldImpl.setUrl(url);
  20. ListFieldImpl.setTarget(target);
  21. ListModeldllImpl ListModeldllImpl = new ListModeldllImpl();
  22. if (popup.equals("1")){
  23. String formWidth = request.getParameter("formWidth") == null ? "" : request.getParameter("formWidth");
  24. String formHeight = request.getParameter("formHeight") == null ? "" : request.getParameter("formHeight");
  25. String remark = request.getParameter("remark") == null ? "" : request.getParameter("remark");
  26. ListFieldImpl.setFormWith(formWidth);
  27. ListFieldImpl.setFormHeight(formHeight);
  28. ListFieldImpl.setRemark(remark);
  29. }
  30. FormListImpl FormList = null;
  31. if(session.getAttribute("FormList"+listid) == null){
  32. return;
  33. } else {
  34. FormList = (FormListImpl)session.getAttribute("FormList"+listid);
  35. ArrayList QueryListImpls = FormList.getQueryList().getlistFields();
  36. String classid= "";
  37. String dataName= "";
  38. String label1= "";
  39. String showTxt= "";
  40. String label2= "";
  41. String image= "";
  42. String label3= "";
  43. if(showType.equals("0")){
  44. classid = request.getParameter("classid") == null ? "0" : request.getParameter("classid");
  45. dataName = request.getParameter("dataName") == null ? "" : request.getParameter("dataName");
  46. label1 = request.getParameter("label1") == null ? "" : request.getParameter("label1");
  47. ListFieldImpl.setClassid(Integer.parseInt(classid));
  48. ListFieldImpl.setDataName(dataName);
  49. ListFieldImpl.setLabel(label1);
  50. }else if (showType.equals("2")){
  51. showTxt = request.getParameter("showTxt") == null ? "" : request.getParameter("showTxt");
  52. label2 = request.getParameter("label2") == null ? "" : request.getParameter("label2");
  53. ListFieldImpl.setShowTxt(showTxt);
  54. ListFieldImpl.setLabel(label2);
  55. }else if (showType.equals("1")){
  56. image = request.getParameter("image") == null ? "" : request.getParameter("image");
  57. label3 = request.getParameter("label3") == null ? "" : request.getParameter("label3");
  58. ListFieldImpl.setImage(image);
  59. ListFieldImpl.setLabel(label3);
  60. }
  61. if (action.equals("add")){
  62. QueryListImpls.add(ListFieldImpl);
  63. }else if (action.equals("edit")){
  64. String oDataName = request.getParameter("oDataName") == null ? "" : request.getParameter("oDataName");
  65. String oLabel = request.getParameter("oLabel") == null ? "" : request.getParameter("oLabel");
  66. ListModeldllImpl.updateListField(FormList,ListFieldImpl,oDataName,oLabel);
  67. }
  68. session.setAttribute("FormList"+listid,FormList);
  69. %>
  70. <script type="text/javascript">
  71. var url = window.opener.location.href;
  72. url = url.replace("sessionReload=true","sessionReload=false");
  73. window.opener.location.replace(url);
  74. window.close();
  75. </script>
  76. <%
  77. }
  78. %>