textareaExc.jsp 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <%@ page contentType="text/html; charset=UTF-8" language="java" %>
  2. <%@ page language="java"
  3. import="java.util.*,
  4. com.sysmodel.collectmodel.xmlmodel.impl.FormCollectionImpl,
  5. com.sysmodel.collectmodel.xmlmodel.impl.ReportFieldImpl,
  6. com.sysmodel.xformmodel.importcontrol.TextAreaControl,
  7. com.sysmodel.collectmodel.xmlmanager.xmlobjdll.CollectModeldllImpl,
  8. com.sysmodel.xformmodel.impl.ValidateImpl"%>
  9. <%
  10. String pageid=request.getParameter("pageid")==null ? "0" : request.getParameter("pageid");
  11. String action=request.getParameter("action")==null ? " " : request.getParameter("action");
  12. String oname=request.getParameter("oname") == null ? "" : request.getParameter("oname");
  13. String label=request.getParameter("label") == null ? "" : request.getParameter("label");
  14. String colspan=request.getParameter("colspan") == null ? "" : request.getParameter("colspan");
  15. String maxlengths=request.getParameter("maxlengths") == null ? "" : request.getParameter("maxlengths");
  16. String name=request.getParameter("name") == null ? "" : request.getParameter("name");
  17. String regxValue = request.getParameter("regxValue") == null ? "" : request.getParameter("regxValue");
  18. String invalidMessage = request.getParameter("invalidMessage") == null ? "" : request.getParameter("invalidMessage");
  19. String promptMessage = request.getParameter("promptMessage") == null ? "" : request.getParameter("promptMessage");
  20. String need = request.getParameter("need") == null ? "false" : request.getParameter("need");
  21. String trime = request.getParameter("trime") == null ? "false" : request.getParameter("trime");
  22. String dojoInuptType = request.getParameter("dojoInuptType") == null ? "" : request.getParameter("dojoInuptType");
  23. FormCollectionImpl FormCollection =null;
  24. if(session.getAttribute("FormCollect"+pageid) == null){
  25. return;
  26. } else {
  27. FormCollection=(FormCollectionImpl)session.getAttribute("FormCollect"+pageid);
  28. ArrayList ReportFields=FormCollection.getAllReportFields();
  29. ReportFieldImpl ReportFieldImpl=new ReportFieldImpl();
  30. CollectModeldllImpl CollectModeldllImpl=new CollectModeldllImpl();
  31. TextAreaControl TextAreaControl=new TextAreaControl();
  32. ReportFieldImpl.setControl(TextAreaControl);
  33. ReportFieldImpl.setName(name);
  34. ReportFieldImpl.setLabel(label);
  35. if(!colspan.equals("")){
  36. ReportFieldImpl.setColspan(colspan);
  37. }
  38. ReportFieldImpl.setControlType("textarea");
  39. ValidateImpl Validate = new ValidateImpl();
  40. Validate.setNeed(new Boolean(need).booleanValue());
  41. Validate.setTrim(new Boolean(trime).booleanValue());
  42. Validate.setRegxValue(regxValue);
  43. Validate.setPromptMessage(promptMessage);
  44. Validate.setInvalidMessage(invalidMessage);
  45. Validate.setMaxLength(maxlengths);
  46. Validate.setDojoType(dojoInuptType);
  47. ReportFieldImpl.setValidate(Validate);
  48. if(action.equals("add")){
  49. ReportFields.add(ReportFieldImpl);
  50. }else if(action.equals("edit")){
  51. CollectModeldllImpl.updateReportField(FormCollection,ReportFieldImpl,oname);
  52. }
  53. session.setAttribute("FormCollect"+pageid,FormCollection);
  54. %>
  55. <script type="text/javascript">
  56. var url = window.opener.location.href;
  57. url = url.replace("sessionReload=true","sessionReload=false");
  58. window.opener.location.replace(url);
  59. window.close();
  60. </script>
  61. <%}%>