17e2721dbb042688b4bc8d4191081c94cc1fd9d1.svn-base 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <%@ page pageEncoding="UTF-8"%>
  2. <%@ page contentType="text/html; charset=UTF-8" language="java" %>
  3. <%@ page language="java"
  4. import="
  5. com.sysmodel.XFormFactory,
  6. com.sysmodel.collectmodel.xmlmodel.impl.FormCollectionImpl,
  7. com.sysmodel.collectmodel.xmlmanager.xmlobjdll.*,
  8. com.sysmodel.collectmodel.xmlmodel.impl.*,
  9. com.sysmodel.collectmodel.xmlmodel.able.*"%>
  10. <%
  11. String pageid = request.getParameter("pageid") == null ? "" : request.getParameter("pageid");
  12. String action = request.getParameter("action") == null ? "" : request.getParameter("action");
  13. String Action = request.getParameter("Action") == null ? "" : request.getParameter("Action");
  14. String type = request.getParameter("type") == null ? "" : request.getParameter("type");
  15. String classid = request.getParameter("classid") == null ? "0" : request.getParameter("classid");
  16. String description = request.getParameter("description") == null ? "" : request.getParameter("description");
  17. String multipart = request.getParameter("multipart") == null ? "false" : request.getParameter("multipart");
  18. System.out.println("pageid="+pageid);
  19. System.out.println("action="+action);
  20. System.out.println("Action="+Action);
  21. System.out.println("type="+type);
  22. System.out.println("classid="+classid);
  23. System.out.println("description="+description);
  24. System.out.println("multipart="+multipart);
  25. int iclassid=Integer.parseInt(classid);
  26. CollectModeldllable CollectModeldllable=new CollectModeldllImpl();
  27. if(Action.equals("add")){
  28. FormCollectionImpl FormCollection = new FormCollectionImpl();
  29. FormCollection.setPageid(pageid);
  30. FormCollection.setAction(action);
  31. FormCollection.setType(type);
  32. FormCollection.setMultipart(new Boolean(multipart).booleanValue());
  33. FormCollection.setClassid(iclassid+"");
  34. FormCollection.setDescription(description);
  35. PageBody PageBody = new PageBodyImpl();
  36. PageHead PageHead = new PageHeadImpl();
  37. PageRoot PageRoot = new PageRootImpl();
  38. FormCollection.setPageHead(PageHead);
  39. FormCollection.setPageBody(PageBody);
  40. FormCollection.setPageRoot(PageRoot);
  41. CollectModeldllable.addMdpCollect(FormCollection);
  42. System.out.println("保存成功");
  43. response.sendRedirect("config.jsp?pageid="+ pageid+"&refreshNode=true");
  44. }else if(Action.equals("edit")){
  45. FormCollectionImpl FormCollection =(FormCollectionImpl)XFormFactory.getXFormModel().getFormCollection(pageid);
  46. FormCollectionImpl FormCollectionClone = (FormCollectionImpl)FormCollection.clone();
  47. FormCollectionClone.setAction(action);
  48. FormCollectionClone.setType(type);
  49. FormCollectionClone.setMultipart(new Boolean(multipart).booleanValue());
  50. FormCollectionClone.setClassid(iclassid+"");
  51. FormCollectionClone.setDescription(description);
  52. CollectModeldllable.updateMdpCollect(FormCollectionClone);
  53. response.sendRedirect("config.jsp?pageid="+ pageid+"&refreshNode=true");
  54. System.out.println("成功");
  55. }
  56. %>