butoonExc.jsp 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <%@ page contentType="text/html; charset=UTF-8" language="java" %>
  2. <%@ page language="java"
  3. import="java.util.*,
  4. com.sysmodel.collectmodel.xmlmodel.able.FormCollection,
  5. com.sysmodel.datamodel.xmlmodel.ModelFactory,
  6. com.sysmodel.datamodel.xmlmodel.impl.MdpClassImpl,
  7. com.sysmodel.datamodel.xmlmodel.able.SysModel,
  8. com.sysmodel.collectmodel.xmlmodel.impl.ReportFieldImpl,
  9. com.sysmodel.collectmodel.xmlmodel.impl.ActionImpl,
  10. com.sysmodel.collectmodel.xmlmodel.impl.PageRootImpl,
  11. com.sysmodel.collectmodel.xmlmanager.xmlobjdll.CollectModeldllImpl"%>
  12. <%
  13. String pageid = request.getParameter("pageid") == null ? "" : request.getParameter("pageid");
  14. String type = request.getParameter("type") == null ? "" : request.getParameter("type");
  15. String value = request.getParameter("value") == null ? "" : request.getParameter("value");
  16. String appendSpace = request.getParameter("appendSpace") == null ? "" : request.getParameter("appendSpace");
  17. String successURL = request.getParameter("successURL") == null ? "" : request.getParameter("successURL");
  18. String action = request.getParameter("action") == null ? "" : request.getParameter("action");
  19. String method = request.getParameter("method") == null ? "" : request.getParameter("method");
  20. String dojoInuptType = request.getParameter("dojoInuptType") == null ? "" : request.getParameter("dojoInuptType");
  21. String oButtontype = request.getParameter("oButtontype") == null ? "" : request.getParameter("oButtontype");
  22. SysModel sysmodel = ModelFactory.getSysmodel();
  23. FormCollection FormCollection = null;
  24. if(session.getAttribute("FormCollect"+pageid) == null ){
  25. return;
  26. } else {
  27. FormCollection = (FormCollection)session.getAttribute("FormCollect"+pageid);
  28. ReportFieldImpl ReportFieldImpl = new ReportFieldImpl();
  29. ActionImpl ActionImpl = new ActionImpl();
  30. ActionImpl.setType(type);
  31. ActionImpl.setValue(value);
  32. ActionImpl.setDojoType(dojoInuptType);
  33. if(!appendSpace.equals("")){
  34. ActionImpl.setAppendSpace(Integer.parseInt(appendSpace));
  35. }
  36. ActionImpl.setMethod(method);
  37. ActionImpl.setReturnURL(successURL);
  38. CollectModeldllImpl CollectModeldllImpl = new CollectModeldllImpl();
  39. if(action.equals("add")){
  40. PageRootImpl PageRootImpl = (PageRootImpl)FormCollection.getPageRoot();
  41. PageRootImpl.addAction(ActionImpl);
  42. }else if(action.equals("edit")){
  43. CollectModeldllImpl.updateAction(FormCollection ,ActionImpl , oButtontype);
  44. }
  45. session.setAttribute("FormCollect"+pageid , FormCollection);
  46. %>
  47. <script type="text/javascript">
  48. var url = window.opener.location.href;
  49. url = url.replace("sessionReload=true","sessionReload=false");
  50. window.opener.location.replace(url);
  51. window.close();
  52. </script>
  53. <%} %>