5e8d932120b798e872279925c1319789b3268c6d.svn-base 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278
  1. <%@ page pageEncoding="UTF-8"%>
  2. <%@ page contentType="text/html; charset=UTF-8" language="java" %>
  3. <%@ page import ="java.util.*"%>
  4. <%@ page language="java"
  5. import="com.sysmodel.datamodel.xmlmodel.ModelFactory,
  6. com.sysmodel.datamodel.xmlmodel.able.SysModel,
  7. com.sysmodel.datamodel.xmlmodel.impl.MdpClassImpl,
  8. com.sysmodel.datamodel.xmlmodel.impl.MdpDataSourceImpl,
  9. com.sysmodel.datamodel.xmlmodel.impl.MdpModuleImpl"%>
  10. <%
  11. String classid = request.getParameter("classid") == null ? "0" : request.getParameter("classid");
  12. String validate = "";
  13. String dataSource = "";
  14. String description = "";
  15. String name = "";
  16. String exist = "";
  17. String type = "";
  18. String catche = "";
  19. int iclassid = Integer.parseInt(classid);
  20. MdpClassImpl MdpClass = null;
  21. SysModel sysmodel = ModelFactory.getSysmodel();
  22. String action = "";
  23. if(classid.equals("0")){
  24. action = "save";
  25. type = request.getParameter("type") == null ? "" : request.getParameter("type");
  26. }else{
  27. MdpClass = (MdpClassImpl)sysmodel.getMdpClassByClassID(iclassid);
  28. action = "edit";
  29. validate = new Boolean(MdpClass.isValidate()).toString();
  30. dataSource = ""+ MdpClass.getDataSource();
  31. description = MdpClass.getDescription();
  32. name = MdpClass.getName();
  33. exist = new Boolean(MdpClass.isExist()).toString();
  34. type = MdpClass.getType();
  35. catche = new Boolean(MdpClass.isCatche()).toString();
  36. }
  37. %>
  38. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  39. <HTML>
  40. <HEAD>
  41. <TITLE></TITLE>
  42. <META http-equiv="Content-Type" content="text/html; charset=GB2312">
  43. <link rel="stylesheet" href="../../../../styles/css.css" type="text/css">
  44. <script type="text/javascript">
  45. <%
  46. String refreshNode = request.getParameter("refreshNode") == null ? "" : request.getParameter("refreshNode");
  47. if(!refreshNode.equals("")){%>
  48. var loadTip = "<div>数据装载中,请稍候...</div>";
  49. var treeImagePath = "<%=request.getContextPath()%>/images/tree_images/";
  50. var url = "<%=request.getContextPath()%>/admin/menu/divTreeService.jsp?nodeID=mdpClasses.<%=type%>";
  51. var treeCloseImg = "plus.gif";
  52. var treeOpenImg = "minus.gif";
  53. parent.parent.frames["confTreeFrame"].refreshNode('mdpClasses.<%=type%>');
  54. parent.location.href="container.jsp?classid=<%=classid%>";
  55. <%}%>
  56. </script>
  57. <script type="text/javascript" src="../../../../scripts/dojo/dojo/dojo.js"
  58. djConfig="isDebug: false, parseOnLoad: true"></script>
  59. <script type="text/javascript">
  60. dojo.require("dijit.form.Form");
  61. dojo.require("dijit.form.ValidationTextBox");
  62. dojo.require("dijit.form.FilteringSelect");
  63. dojo.require("dijit.form.NumberSpinner");
  64. dojo.require("dijit.form.Button");
  65. dojo.require("dijit.Tooltip");
  66. dojo.require("dijit.form.Button");
  67. </script>
  68. <style type="text/css">
  69. @import "../../../../scripts/dojo/dojo/resources/dojo.css";
  70. @import "../../../../scripts/dojo/dijit/themes/tundra/tundra.css";
  71. @import "../../../../scripts/dojo/dijit/themes/tundra/tundra_rtl.css";
  72. @import "../../../../scripts/dojo/dijit/tests/css/dijitTests.css";
  73. .formQuestion {
  74. background-color:#d0e3f5;
  75. padding:0.3em;
  76. font-weight:900;
  77. font-family:Verdana, Arial, sans-serif;
  78. font-size:0.8em;
  79. color:#5a5a5a;
  80. }
  81. .formAnswer {
  82. background-color:#f5eede;
  83. padding:0.3em;
  84. margin-bottom:1em;
  85. width: 100%;
  86. }
  87. .pageSubContentTitle {
  88. color:#8e8e8e;
  89. font-size:1em;
  90. font-family:Verdana, Arial, sans-serif;
  91. margin-bottom:0.75em;
  92. }
  93. .small INPUT {
  94. width: 2.5em;
  95. }
  96. .medium INPUT {
  97. width: 10em;
  98. }
  99. .long INPUT {
  100. width: 20em;
  101. }
  102. .firstLabel {
  103. display: inline-block;
  104. display: -moz-inline-box;
  105. width: 10em;
  106. min-width: 10em;
  107. }
  108. .secondLabel {
  109. width: auto;
  110. margin-left: 5em;
  111. margin-right: 1em;
  112. }
  113. fieldset label {
  114. margin-right: 1em;
  115. }
  116. .noticeMessage {
  117. display: block;
  118. float: right;
  119. font-weight: normal;
  120. font-family:Arial, Verdana, sans-serif;
  121. color:#663;
  122. font-size:0.9em;
  123. }
  124. /* group multiple buttons in a row */
  125. .box {
  126. display: block;
  127. text-align: center;
  128. }
  129. .box .dojoButton {
  130. margin-right: 10px;
  131. }
  132. .dojoButtonContents {
  133. font-size: 1.6em;
  134. }
  135. .dojoMenuItem2Disabled .dojoMenuItem2Label span,
  136. .dojoMenuItem2Disabled .dojoMenuItem2Accel span {
  137. color: ThreeDShadow;
  138. }
  139. .dojoMenuItem2Disabled .dojoMenuItem2Label span span,
  140. .dojoMenuItem2Disabled .dojoMenuItem2Accel span span {
  141. color: ThreeDHighlight;
  142. }
  143. </style>
  144. </HEAD>
  145. <body class="tundra">
  146. <form action="editExc.jsp" name="form1" method="post">
  147. <input type="hidden" name="action" value="<%=action%>">
  148. <div id=total>
  149. <div class="whiteborder">
  150. <div class="titback">
  151. <div class="floatleft">
  152. <img src="../../../../images/index/arrow1.gif" width="20" height="24"/></div>
  153. <div class="dropshadow">数据库表配置&nbsp;&nbsp;&nbsp;</div>
  154. <div class="clear"></div>
  155. </div>
  156. <div class="report">
  157. <table align="center" id="SortTable512_1" width="100%" cellpadding="1" cellspacing="1" class="ltab2">
  158. <tr>
  159. <td align="right" width="28%">配置编号&nbsp;<span class="redcolor">*</span>&nbsp;&nbsp;</td>
  160. <td align="left" width="72%">
  161. <input dojotype="dijit.form.NumberSpinner"
  162. id="classid" name="classid"
  163. value="<%=classid %>"
  164. constraints="{min: 0, max:3000, places:0}"
  165. size=10
  166. invalidMessage="配置编号必须录入数字!" <%if(action.equals("edit")){ %> readonly<%} %>>
  167. </td>
  168. </tr>
  169. <tr>
  170. <td align="right">是否在用&nbsp;<span class="redcolor">*</span>&nbsp;&nbsp;</td>
  171. <td align="left">
  172. <select dojoType="dijit.form.FilteringSelect" required="true" name="validate" id="validate" autocomplete="true">
  173. <option value="true" <%if(validate.equals("true")) out.print("selected");%>>true</option>
  174. <option value="false" <%if(validate.equals("false")) out.print("selected");%>>false </option>
  175. </select>
  176. </td>
  177. </tr>
  178. <tr>
  179. <td align="right">数据链接&nbsp;<span class="redcolor">*</span>&nbsp;&nbsp;</td>
  180. <td align="left">
  181. <select dojoType="dijit.form.FilteringSelect" required="true" name="dataSource" id="dataSource" autocomplete="true">
  182. <option></option>
  183. <%
  184. ArrayList listsource = sysmodel.getMdpDataSources();
  185. MdpDataSourceImpl MdpDataSource = new MdpDataSourceImpl();
  186. for(int i = 0 ; i < listsource.size(); i ++){
  187. MdpDataSource = (MdpDataSourceImpl)listsource.get(i);
  188. String id =String.valueOf(MdpDataSource.getDataSourceid());
  189. %>
  190. <option value="<%=id %>" <%if(dataSource.equals(id)) out.print("selected"); %> ><%=MdpDataSource.getURL()%></option>
  191. <%
  192. }
  193. %>
  194. </select>
  195. </td>
  196. </tr>
  197. <tr>
  198. <td align="right">中文名字&nbsp;<span class="redcolor">*</span>&nbsp;&nbsp;</td>
  199. <td align="left">
  200. <input type="text" value="<%=description %>"
  201. id="description" name="description" class="medium"
  202. dojoType="dijit.form.ValidationTextBox"
  203. required="true"
  204. ucfirst="true"
  205. invalidMessage="中文名字必须录入!">
  206. </td>
  207. </tr>
  208. <tr>
  209. <td align="right">英文名字&nbsp;<span class="redcolor">*</span>&nbsp;&nbsp;</td>
  210. <td align="left">
  211. <input type="text" value="<%=name %>"
  212. id="name" name="name" class="medium"
  213. dojoType="dijit.form.ValidationTextBox"
  214. required="true"
  215. regExp="^[A-Za-z0-9$_]+$"
  216. invalidMessage="英文名字格式错误,必填项!">
  217. </td>
  218. </tr>
  219. <tr>
  220. <td align="right">是否生成到库&nbsp;&nbsp;&nbsp;</td>
  221. <td align="left">
  222. <select dojoType="dijit.form.FilteringSelect" name="exist" id="exist" autocomplete="true">
  223. <option value="true" <%if(exist.equals("true")) out.print("selected");%>>true</option>
  224. <option value="false" <%if(exist.equals("false")) out.print("selected");%>>false </option>
  225. </select>
  226. </td>
  227. </tr>
  228. <tr>
  229. <td align="right">所属模块&nbsp;<span class="redcolor">*</span>&nbsp;&nbsp;</td>
  230. <td align="left">
  231. <select dojoType="dijit.form.FilteringSelect" required="true" name="type" id="type" autocomplete="true">
  232. <%
  233. ArrayList mod = sysmodel.getMdpModules();
  234. MdpModuleImpl MdpModule = new MdpModuleImpl();
  235. for(int i = 0 ; i < mod.size(); i ++){
  236. MdpModule = (MdpModuleImpl)mod.get(i);
  237. String id =String.valueOf(MdpModule.getCode());
  238. %>
  239. <option value="<%=id %>" <%if(id.equals(type)) out.print("selected"); %> ><%=MdpModule.getName() %></option>
  240. <%
  241. }
  242. %>
  243. </select>
  244. </td>
  245. </tr>
  246. <tr>
  247. <td align="right">是否缓存&nbsp;&nbsp;&nbsp;</td>
  248. <td align="left">
  249. <select dojoType="dijit.form.FilteringSelect" name="catche" id="catche" autocomplete="true">
  250. <option value="true" <%if(catche.equals("true")) out.print("selected");%>>true</option>
  251. <option value="false" <%if(catche.equals("false")) out.print("selected");%>>false </option>
  252. </select>
  253. </td>
  254. </tr>
  255. <tr>
  256. </tr>
  257. </table>
  258. </div>
  259. <div class="btmbox">
  260. <button id="save" dojoType="dijit.form.Button" onClick='console.log("clicked simple")' type="submit" iconClass="plusIcon">
  261. 保存
  262. </button>
  263. <span dojoType="dijit.Tooltip" connectId="save">保存按钮</span>&nbsp;&nbsp;
  264. </div>
  265. </div>
  266. </div>
  267. </form>
  268. </BODY>
  269. </HTML>