123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236 |
- <%@ page pageEncoding="UTF-8"%>
- <%@ page contentType="text/html; charset=UTF-8" language="java" %>
- <%@ page language="java"
- import="com.sysmodel.datamodel.xmlmodel.ModelFactory,
- com.sysmodel.datamodel.xmlmodel.able.SysModel,
- com.sysmodel.datamodel.xmlmodel.impl.MdpDataSourceImpl"%>
- <%
- String dataSourceid = request.getParameter("dataSourceid") == null ? "0" : request.getParameter("dataSourceid");
- String description="",password="",DataBase="",url="",user="",jndi="";
- int iDataSourceid = Integer.parseInt(dataSourceid);
- MdpDataSourceImpl MdpDataSource = null;
- SysModel sysmodel = ModelFactory.getSysmodel();
- String action = "";
- if(dataSourceid.equals("0")){
- action = "save";
- }else{
- MdpDataSource = (MdpDataSourceImpl)sysmodel.getDataSourceByCode(iDataSourceid);
- action = "edit";
- description=MdpDataSource.getDescription();
- password=MdpDataSource.getPassword();
- DataBase=MdpDataSource.getDataBase();
- url=MdpDataSource.getURL();
- user=MdpDataSource.getUser();
- jndi=MdpDataSource.getJNDI();
- }
- %>
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
- <HTML>
- <HEAD>
- <TITLE></TITLE>
- <META http-equiv="Content-Type" content="text/html; charset=GB2312">
- <link rel="stylesheet" href="../../../../styles/css.css" type="text/css">
- <script type="text/javascript" src="../../../../scripts/dojo/dojo/dojo.js"
- djConfig="isDebug: false, parseOnLoad: true"></script>
- <script type="text/javascript">
- dojo.require("dijit.form.Form");
- dojo.require("dijit.form.ValidationTextBox");
- dojo.require("dijit.form.ComboBox");
- dojo.require("dijit.form.FilteringSelect");
- dojo.require("dijit.form.CheckBox");
- dojo.require("dijit.form.NumberSpinner");
- dojo.require("dijit.Editor");
- dojo.require("dijit.form.Button");
-
-
- function makeReadOnlyById(fieldId) {
- var field = dojo.byId(fieldId);
- field.readOnly = true;
- field.style.cursor = 'default';
- dojo.connect(field, 'onfocus', function () { field.blur(); });
- }
- dojo.addOnLoad(
- function() {
- makeReadOnlyById("dataSourceid");
- makeReadOnlyById("DataBase");
- }
- )
- </script>
- <style type="text/css">
- @import "../../../../scripts/dojo/dojo/resources/dojo.css";
- @import "../../../../scripts/dojo/dijit/themes/tundra/tundra.css";
- @import "../../../../scripts/dojo/dijit/themes/tundra/tundra_rtl.css";
- @import "../../../../scripts/dojo/dijit/tests/css/dijitTests.css";
- .formQuestion {
- background-color:#d0e3f5;
- padding:0.3em;
- font-weight:900;
- font-family:Verdana, Arial, sans-serif;
- font-size:0.8em;
- color:#5a5a5a;
- }
- .formAnswer {
- background-color:#f5eede;
- padding:0.3em;
- margin-bottom:1em;
- width: 100%;
- }
- .pageSubContentTitle {
- color:#8e8e8e;
- font-size:1em;
- font-family:Verdana, Arial, sans-serif;
- margin-bottom:0.75em;
- }
- .small INPUT {
- width: 2.5em;
- }
- .medium INPUT {
- width: 10em;
- }
- .long INPUT {
- width: 20em;
- }
- .firstLabel {
- display: inline-block;
- display: -moz-inline-box;
- width: 10em;
- min-width: 10em;
- }
- .secondLabel {
- width: auto;
- margin-left: 5em;
- margin-right: 1em;
- }
- fieldset label {
- margin-right: 1em;
- }
- .noticeMessage {
- display: block;
- float: right;
- font-weight: normal;
- font-family:Arial, Verdana, sans-serif;
- color:#663;
- font-size:0.9em;
- }
- </style>
-
-
-
-
-
-
- <script type="text/javascript">
- <%
- String refreshNode = request.getParameter("refreshNode") == null ? "" : request.getParameter("refreshNode");
- if(!refreshNode.equals("")){%>
- var loadTip = "<div>数据装载中,请稍候...</div>";
- var treeImagePath = "<%=request.getContextPath()%>/images/tree_images/";
- var url = "<%=request.getContextPath()%>/admin/menu/divTreeService.jsp?nodeID=mdpDataSources";
- var treeCloseImg = "plus.gif";
- var treeOpenImg = "minus.gif";
- parent.frames["confTreeFrame"].refreshNode('mdpDataSources');
- <%}%>
- </script></HEAD>
- <body class="tundra">
- <form action="editExc.jsp" method="post">
- <input type="hidden" name="action" value="<%=action%>">
- <div id=total>
- <div class="whiteborder">
- <div class="titback">
- <div class="floatleft"><img src="../../../../images/index/arrow1.gif" width="20" height="24"/></div>
- <div class="dropshadow">数据库链接配置</div>
- <div class="clear"></div>
- </div>
- <div class="report">
- <table align="center" id="SortTable512_1" width="100%" cellpadding="1" cellspacing="1" class="ltab2">
-
-
- <tr>
- <td>编号 <span class="redcolor">*</span></td>
-
- <td><input dojotype="dijit.form.NumberSpinner"
- id="dataSourceid" name="dataSourceid"
- value="<%=dataSourceid %>"
- constraints="{min: 0, max:10000, places:0}"
- invalidMessage="请输入0-10000内的数值!"
- type="text" <%if(action.equals("edit")){ %> readonly<%} %>></td>
- </tr>
- <tr>
- <td>描述 <span class="redcolor">*</span></td>
- <td><input type="text" id="description" name="description" class="medium"
- dojoType="dijit.form.ValidationTextBox"
- required="true"
- ucfirst="true"
- value="<%=description %>"
- invalidMessage="描述信息必须录入!"/></td>
- </tr>
- <tr>
- <td>数据库类型 <span class="redcolor">*</span></td>
- <td>
- <select dojoType="dijit.form.FilteringSelect"
- required="true" name="DataBase" id="DataBase" autocomplete="true" >
- <option value="oracle" <%if(DataBase.equals("oracle")) {%> selected <%} %>>oracle数据库</option>
- <option value="db2" <%if(DataBase.equals("db2")) {%> selected <%} %>>db2数据库</option>
- <option value="sqlserver" <%if(DataBase.equals("sqlserver")) {%> selected <%} %>>sqlserver数据库</option>
- <option value="sysbase" <%if(DataBase.equals("sysbase")) {%> selected <%} %>>sysbase数据库</option>
- <option value="mysql" <%if(DataBase.equals("mysql")) {%> selected <%} %>>mysql数据库</option>
- </select>
- </td>
- </tr>
- <tr>
- <td>URL <span class="redcolor">*</span></td>
- <td><input type="text" id="url" name="url" class="medium"
- dojoType="dijit.form.ValidationTextBox"
- required="true"
- ucfirst="true"
- value="<%=url %>"
- invalidMessage="URL必须录入!"/></td>
- </tr>
- <tr>
- <td>用户名 <span class="redcolor">*</span></td>
- <td><input type="text" id="user" name="user" class="medium"
- dojoType="dijit.form.ValidationTextBox"
- required="true"
- ucfirst="true"
- value="<%=user %>"
- invalidMessage="用户名必须录入!"/></td>
- </tr>
- <tr>
- <td>密码 <span class="redcolor">*</span></td>
- <td><input type="text" id="password" name="password" class="medium"
- dojoType="dijit.form.ValidationTextBox"
- required="true"
- ucfirst="true"
- value="<%=password %>"
- invalidMessage="密码不能为空!"/></td>
- </tr>
- <tr>
- <td>JNDI <span class="redcolor">*</span></td>
- <td><input type="text" id="jndi" name="jndi" class="medium"
- dojoType="dijit.form.ValidationTextBox"
- required="true"
- ucfirst="true"
- value="<%=jndi %>"
- invalidMessage="JNDI必须录入!"/></td>
- </tr>
- <tr>
- </tr>
-
- </table>
- </div>
- <div class="btmbox">
-
- <button id="save" dojoType="dijit.form.Button" onClick='console.log("clicked simple")' type="submit" iconClass="plusIcon">
- 保存
- </button>
- <span dojoType="dijit.Tooltip" connectId="save">保存按钮</span>
- </div>
-
- </div>
- </div>
- </form>
- </BODY>
- </HTML>
|