designExc.jsp 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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.xmlmanager.xmlobjdll.CollectModeldllable,
  6. com.sysmodel.collectmodel.xmlmanager.xmlobjdll.CollectModeldllImpl,
  7. com.sysmodel.XFormFactory,
  8. com.sysmodel.collectmodel.xmlmodel.impl.ReportFieldImpl"
  9. %>
  10. <%
  11. String pageid=request.getParameter("pageid") == null ? "" : request.getParameter("pageid");
  12. String doaction = request.getParameter("doaction") == null ? "" : request.getParameter("doaction");
  13. String deltype = request.getParameter("deltype") == null ? "" : request.getParameter("deltype");
  14. FormCollectionImpl FormCollect = null;
  15. if(session.getAttribute("FormCollect"+pageid) == null){
  16. return;
  17. } else {
  18. FormCollect = (FormCollectionImpl)session.getAttribute("FormCollect"+pageid);
  19. }
  20. if(doaction.equals("reload")){
  21. FormCollectionImpl FormCollectold =(FormCollectionImpl)XFormFactory.getXFormModel().getFormCollection(pageid);
  22. FormCollect = (FormCollectionImpl)FormCollectold.clone();
  23. }else if(doaction.equals("save")){
  24. CollectModeldllImpl CollectModeldllImpl =new CollectModeldllImpl();
  25. CollectModeldllImpl.updateMdpCollect(FormCollect);
  26. }if(deltype.equals("ReportField")){
  27. String fieldname = request.getParameter("fieldname") == null ? "" : request.getParameter("fieldname");
  28. ArrayList ReportFields=FormCollect.getAllReportFields();
  29. for(int i=0; i<ReportFields.size(); i++){
  30. ReportFieldImpl ReportFieldImpl=(ReportFieldImpl)ReportFields.get(i);
  31. if(ReportFieldImpl.getName().equals(fieldname)){
  32. ReportFields.remove(i);
  33. }
  34. }
  35. }
  36. session.setAttribute("FormCollect"+pageid,FormCollect);
  37. response.sendRedirect("design.jsp?pagid="+pageid+"&sessionReload=false");
  38. %>