70dfaabea355346ae103d953b879ebac2aff633a.svn-base 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236
  1. <%@ page pageEncoding="UTF-8"%>
  2. <%@ page contentType="text/html; charset=UTF-8" language="java" %>
  3. <%@ page language="java"
  4. import="com.sysmodel.datamodel.xmlmodel.ModelFactory,
  5. com.sysmodel.datamodel.xmlmodel.able.SysModel,
  6. com.sysmodel.datamodel.xmlmodel.impl.MdpDataSourceImpl"%>
  7. <%
  8. String dataSourceid = request.getParameter("dataSourceid") == null ? "0" : request.getParameter("dataSourceid");
  9. String description="",password="",DataBase="",url="",user="",jndi="";
  10. int iDataSourceid = Integer.parseInt(dataSourceid);
  11. MdpDataSourceImpl MdpDataSource = null;
  12. SysModel sysmodel = ModelFactory.getSysmodel();
  13. String action = "";
  14. if(dataSourceid.equals("0")){
  15. action = "save";
  16. }else{
  17. MdpDataSource = (MdpDataSourceImpl)sysmodel.getDataSourceByCode(iDataSourceid);
  18. action = "edit";
  19. description=MdpDataSource.getDescription();
  20. password=MdpDataSource.getPassword();
  21. DataBase=MdpDataSource.getDataBase();
  22. url=MdpDataSource.getURL();
  23. user=MdpDataSource.getUser();
  24. jndi=MdpDataSource.getJNDI();
  25. }
  26. %>
  27. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  28. <HTML>
  29. <HEAD>
  30. <TITLE></TITLE>
  31. <META http-equiv="Content-Type" content="text/html; charset=GB2312">
  32. <link rel="stylesheet" href="../../../../styles/css.css" type="text/css">
  33. <script type="text/javascript" src="../../../../scripts/dojo/dojo/dojo.js"
  34. djConfig="isDebug: false, parseOnLoad: true"></script>
  35. <script type="text/javascript">
  36. dojo.require("dijit.form.Form");
  37. dojo.require("dijit.form.ValidationTextBox");
  38. dojo.require("dijit.form.ComboBox");
  39. dojo.require("dijit.form.FilteringSelect");
  40. dojo.require("dijit.form.CheckBox");
  41. dojo.require("dijit.form.NumberSpinner");
  42. dojo.require("dijit.Editor");
  43. dojo.require("dijit.form.Button");
  44. function makeReadOnlyById(fieldId) {
  45. var field = dojo.byId(fieldId);
  46. field.readOnly = true;
  47. field.style.cursor = 'default';
  48. dojo.connect(field, 'onfocus', function () { field.blur(); });
  49. }
  50. dojo.addOnLoad(
  51. function() {
  52. makeReadOnlyById("dataSourceid");
  53. makeReadOnlyById("DataBase");
  54. }
  55. )
  56. </script>
  57. <style type="text/css">
  58. @import "../../../../scripts/dojo/dojo/resources/dojo.css";
  59. @import "../../../../scripts/dojo/dijit/themes/tundra/tundra.css";
  60. @import "../../../../scripts/dojo/dijit/themes/tundra/tundra_rtl.css";
  61. @import "../../../../scripts/dojo/dijit/tests/css/dijitTests.css";
  62. .formQuestion {
  63. background-color:#d0e3f5;
  64. padding:0.3em;
  65. font-weight:900;
  66. font-family:Verdana, Arial, sans-serif;
  67. font-size:0.8em;
  68. color:#5a5a5a;
  69. }
  70. .formAnswer {
  71. background-color:#f5eede;
  72. padding:0.3em;
  73. margin-bottom:1em;
  74. width: 100%;
  75. }
  76. .pageSubContentTitle {
  77. color:#8e8e8e;
  78. font-size:1em;
  79. font-family:Verdana, Arial, sans-serif;
  80. margin-bottom:0.75em;
  81. }
  82. .small INPUT {
  83. width: 2.5em;
  84. }
  85. .medium INPUT {
  86. width: 10em;
  87. }
  88. .long INPUT {
  89. width: 20em;
  90. }
  91. .firstLabel {
  92. display: inline-block;
  93. display: -moz-inline-box;
  94. width: 10em;
  95. min-width: 10em;
  96. }
  97. .secondLabel {
  98. width: auto;
  99. margin-left: 5em;
  100. margin-right: 1em;
  101. }
  102. fieldset label {
  103. margin-right: 1em;
  104. }
  105. .noticeMessage {
  106. display: block;
  107. float: right;
  108. font-weight: normal;
  109. font-family:Arial, Verdana, sans-serif;
  110. color:#663;
  111. font-size:0.9em;
  112. }
  113. </style>
  114. <script type="text/javascript">
  115. <%
  116. String refreshNode = request.getParameter("refreshNode") == null ? "" : request.getParameter("refreshNode");
  117. if(!refreshNode.equals("")){%>
  118. var loadTip = "<div>数据装载中,请稍候...</div>";
  119. var treeImagePath = "<%=request.getContextPath()%>/images/tree_images/";
  120. var url = "<%=request.getContextPath()%>/admin/menu/divTreeService.jsp?nodeID=mdpDataSources";
  121. var treeCloseImg = "plus.gif";
  122. var treeOpenImg = "minus.gif";
  123. parent.frames["confTreeFrame"].refreshNode('mdpDataSources');
  124. <%}%>
  125. </script></HEAD>
  126. <body class="tundra">
  127. <form action="editExc.jsp" method="post">
  128. <input type="hidden" name="action" value="<%=action%>">
  129. <div id=total>
  130. <div class="whiteborder">
  131. <div class="titback">
  132. <div class="floatleft"><img src="../../../../images/index/arrow1.gif" width="20" height="24"/></div>
  133. <div class="dropshadow">数据库链接配置</div>
  134. <div class="clear"></div>
  135. </div>
  136. <div class="report">
  137. <table align="center" id="SortTable512_1" width="100%" cellpadding="1" cellspacing="1" class="ltab2">
  138. <tr>
  139. <td>编号 <span class="redcolor">*</span></td>
  140. <td><input dojotype="dijit.form.NumberSpinner"
  141. id="dataSourceid" name="dataSourceid"
  142. value="<%=dataSourceid %>"
  143. constraints="{min: 0, max:10000, places:0}"
  144. invalidMessage="请输入0-10000内的数值!"
  145. type="text" <%if(action.equals("edit")){ %> readonly<%} %>></td>
  146. </tr>
  147. <tr>
  148. <td>描述 <span class="redcolor">*</span></td>
  149. <td><input type="text" id="description" name="description" class="medium"
  150. dojoType="dijit.form.ValidationTextBox"
  151. required="true"
  152. ucfirst="true"
  153. value="<%=description %>"
  154. invalidMessage="描述信息必须录入!"/></td>
  155. </tr>
  156. <tr>
  157. <td>数据库类型 <span class="redcolor">*</span></td>
  158. <td>
  159. <select dojoType="dijit.form.FilteringSelect"
  160. required="true" name="DataBase" id="DataBase" autocomplete="true" >
  161. <option value="oracle" <%if(DataBase.equals("oracle")) {%> selected <%} %>>oracle数据库</option>
  162. <option value="db2" <%if(DataBase.equals("db2")) {%> selected <%} %>>db2数据库</option>
  163. <option value="sqlserver" <%if(DataBase.equals("sqlserver")) {%> selected <%} %>>sqlserver数据库</option>
  164. <option value="sysbase" <%if(DataBase.equals("sysbase")) {%> selected <%} %>>sysbase数据库</option>
  165. <option value="mysql" <%if(DataBase.equals("mysql")) {%> selected <%} %>>mysql数据库</option>
  166. </select>
  167. </td>
  168. </tr>
  169. <tr>
  170. <td>URL <span class="redcolor">*</span></td>
  171. <td><input type="text" id="url" name="url" class="medium"
  172. dojoType="dijit.form.ValidationTextBox"
  173. required="true"
  174. ucfirst="true"
  175. value="<%=url %>"
  176. invalidMessage="URL必须录入!"/></td>
  177. </tr>
  178. <tr>
  179. <td>用户名 <span class="redcolor">*</span></td>
  180. <td><input type="text" id="user" name="user" class="medium"
  181. dojoType="dijit.form.ValidationTextBox"
  182. required="true"
  183. ucfirst="true"
  184. value="<%=user %>"
  185. invalidMessage="用户名必须录入!"/></td>
  186. </tr>
  187. <tr>
  188. <td>密码 <span class="redcolor">*</span></td>
  189. <td><input type="text" id="password" name="password" class="medium"
  190. dojoType="dijit.form.ValidationTextBox"
  191. required="true"
  192. ucfirst="true"
  193. value="<%=password %>"
  194. invalidMessage="密码不能为空!"/></td>
  195. </tr>
  196. <tr>
  197. <td>JNDI <span class="redcolor">*</span></td>
  198. <td><input type="text" id="jndi" name="jndi" class="medium"
  199. dojoType="dijit.form.ValidationTextBox"
  200. required="true"
  201. ucfirst="true"
  202. value="<%=jndi %>"
  203. invalidMessage="JNDI必须录入!"/></td>
  204. </tr>
  205. <tr>
  206. </tr>
  207. </table>
  208. </div>
  209. <div class="btmbox">
  210. <button id="save" dojoType="dijit.form.Button" onClick='console.log("clicked simple")' type="submit" iconClass="plusIcon">
  211. 保存
  212. </button>
  213. <span dojoType="dijit.Tooltip" connectId="save">保存按钮</span>&nbsp;&nbsp;
  214. </div>
  215. </div>
  216. </div>
  217. </form>
  218. </BODY>
  219. </HTML>