bpmDefinitionDesign.jsp 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. <%@ page language="java" contentType="text/html; charset=UTF-8"
  2. pageEncoding="UTF-8" import="java.util.List,com.hotent.core.util.AppUtil" %>
  3. <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
  4. <%
  5. String basePath = request.getContextPath();
  6. String uId = request.getAttribute("uId").toString();
  7. // 在flex中保存,发布流程的请求地址,isAjaxRequest参数,解决session失效下,【保存】操作会弹出登录页代码提示,具体可看PermissionFilter.java
  8. String postUrl = basePath + "/platform/bpm/bpmDefinition/flexDefSave.ht?isAjaxRequest=true";
  9. String flowKeyGetUrl = basePath+"/platform/bpm/bpmDefinition/getFlowKey.ht";
  10. String flowListGetUrl = basePath+"/platform/bpm/bpmDefinition/getFlowListByTypeId.ht";
  11. String xmlRecord = request.getAttribute("xmlRecord").toString();
  12. // 加载数据操作
  13. // 获取流程定义id
  14. String defId = "";
  15. String loadDateUrl = ""; // flex中获取加载数据的地址
  16. Object defIdObj = request.getAttribute("defId");
  17. if(defIdObj != null && !defIdObj.toString().equals("0")){
  18. defId = defIdObj.toString(); // 流程id
  19. loadDateUrl = basePath + "/platform/bpm/bpmDefinition/flexGet.ht?defId=" + defId;
  20. }
  21. %>
  22. <head>
  23. <title>
  24. 在线流程设计--<c:choose>
  25. <c:when test="${not empty bpmDefinition}">
  26. ${bpmDefinition.subject} --(版本${bpmDefinition.versionNo})
  27. </c:when>
  28. <c:otherwise>
  29. ${subject}
  30. </c:otherwise>
  31. </c:choose>
  32. </title>
  33. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  34. </head>
  35. <style type="text/css" media="screen">
  36. html, body { height:100%; }
  37. body { margin:0; padding:0; overflow:auto; text-align:center;
  38. background-color: #ffffff; }
  39. #flashContent { display:none; }
  40. </style>
  41. <script type="text/javascript" src="<%=basePath%>/media/swf/bpm/swfobject.js"></script>
  42. <script type="text/javascript">
  43. var swfVersionStr = "10.0.0";
  44. var xiSwfUrlStr = "<%=basePath%>/media/swf/bpm/playerProductInstall.swf";
  45. var flashvars = {};
  46. var params = {};
  47. params.quality = "high";
  48. params.bgcolor = "#ffffff";
  49. params.allowscriptaccess = "sameDomain";
  50. params.allowfullscreen = "true";
  51. params.FlashVars="flowKeyGetUrl=<%=flowKeyGetUrl%>&flowListGetUrl=<%=flowListGetUrl%>";
  52. var attributes = {};
  53. attributes.id = "bpmeditor";
  54. attributes.name = "bpmeditor";
  55. attributes.align = "middle";
  56. swfobject.embedSWF("<%=basePath%>/media/swf/bpm/bpmeditor.swf", "flashContent",
  57. "100%", "100%", swfVersionStr, xiSwfUrlStr, flashvars, params, attributes);
  58. swfobject.createCSS("#flashContent", "display:block;text-align:left;");
  59. function loadData(){
  60. var str = document.getElementById('xmlRecord').value;
  61. return str;
  62. }
  63. //供flex方向调用,获取提交数据的地址
  64. function getCtxPath(){
  65. return document.getElementById("postUrl").value;
  66. }
  67. // 供flex方向调用,关闭flex页面
  68. function closeFlexWindow(){
  69. opener.location.reload();
  70. window.close();
  71. }
  72. // 获取flex中加载流程设计图对应的xml数据,请求地址
  73. function getLoadDataUrl(){
  74. return document.getElementById("flexLoadDataUrl").value;
  75. }
  76. </script>
  77. <div>
  78. <textarea id="xmlRecord" style="display:none"><%=xmlRecord%></textarea>
  79. <input id="postUrl" type="hidden" value="<%=postUrl%>" />
  80. <input id="flexLoadDataUrl" type="hidden" value="<%=loadDateUrl%>" />
  81. </div>
  82. <div id="flashContent">
  83. <p> To view this page ensure that Adobe Flash Player version 10.0.0 or greater is installed. </p>
  84. <script type="text/javascript">
  85. var pageHost = ((document.location.protocol == "https:") ? "https://" : "http://");
  86. document.write("<a href='http://www.adobe.com/go/getflashplayer'><img src='"
  87. + pageHost + "www.adobe.com/images/shared/download_buttons/get_flash_player.gif' alt='Get Adobe Flash player'/></a>" );
  88. </script>
  89. </div>
  90. <noscript>
  91. <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%" id="bpmeditor">
  92. <param name="movie" value="<%=basePath%>/media/swf/bpm/bpmeditor.swf" />
  93. <param name="quality" value="high" />
  94. <param name="bgcolor" value="#ffffff" />
  95. <param name="allowScriptAccess" value="sameDomain" />
  96. <param name="allowFullScreen" value="true" />
  97. <param name="FlashVars" value="flowKeyGetUrl=<%=flowKeyGetUrl%>&flowListGetUrl=<%=flowListGetUrl%>" />
  98. <!--[if !IE]>-->
  99. <object type="application/x-shockwave-flash" data="<%=basePath%>/media/swf/bpm/bpmeditor.swf" width="100%" height="80%">
  100. <param name="quality" value="high" />
  101. <param name="bgcolor" value="#ffffff" />
  102. <param name="allowScriptAccess" value="sameDomain" />
  103. <param name="allowFullScreen" value="true" />
  104. <param name="FlashVars" value="flowKeyGetUrl=<%=flowKeyGetUrl%>&flowListGetUrl=<%=flowListGetUrl%>" />
  105. <!--<![endif]-->
  106. <!--[if gte IE 6]>-->
  107. <p>
  108. Either scripts and active content are not permitted to run or Adobe Flash Player version
  109. 10.0.0 or greater is not installed.
  110. </p>
  111. <!--<![endif]-->
  112. <a href="http://www.adobe.com/go/getflashplayer">
  113. <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash Player" />
  114. </a>
  115. <!--[if !IE]>-->
  116. </object>
  117. <!--<![endif]-->
  118. </object>
  119. </noscript>