123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278 |
- <%@ page pageEncoding="UTF-8"%>
- <%@ page contentType="text/html; charset=UTF-8" language="java" %>
- <%@ page import ="java.util.*"%>
- <%@ page language="java"
- import="com.sysmodel.datamodel.xmlmodel.ModelFactory,
- com.sysmodel.datamodel.xmlmodel.able.SysModel,
- com.sysmodel.datamodel.xmlmodel.impl.MdpClassImpl,
- com.sysmodel.datamodel.xmlmodel.impl.MdpDataSourceImpl,
- com.sysmodel.datamodel.xmlmodel.impl.MdpModuleImpl"%>
- <%
- String classid = request.getParameter("classid") == null ? "0" : request.getParameter("classid");
- String validate = "";
- String dataSource = "";
- String description = "";
- String name = "";
- String exist = "";
- String type = "";
- String catche = "";
- int iclassid = Integer.parseInt(classid);
-
- MdpClassImpl MdpClass = null;
- SysModel sysmodel = ModelFactory.getSysmodel();
- String action = "";
- if(classid.equals("0")){
- action = "save";
- type = request.getParameter("type") == null ? "" : request.getParameter("type");
- }else{
-
- MdpClass = (MdpClassImpl)sysmodel.getMdpClassByClassID(iclassid);
- action = "edit";
- validate = new Boolean(MdpClass.isValidate()).toString();
- dataSource = ""+ MdpClass.getDataSource();
- description = MdpClass.getDescription();
- name = MdpClass.getName();
- exist = new Boolean(MdpClass.isExist()).toString();
- type = MdpClass.getType();
- catche = new Boolean(MdpClass.isCatche()).toString();
- }
- %>
- <!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">
- <%
- 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=mdpClasses.<%=type%>";
- var treeCloseImg = "plus.gif";
- var treeOpenImg = "minus.gif";
- parent.parent.frames["confTreeFrame"].refreshNode('mdpClasses.<%=type%>');
- parent.location.href="container.jsp?classid=<%=classid%>";
- <%}%>
- </script>
- <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.FilteringSelect");
- dojo.require("dijit.form.NumberSpinner");
- dojo.require("dijit.form.Button");
- dojo.require("dijit.Tooltip");
- dojo.require("dijit.form.Button");
- </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;
- }
- /* group multiple buttons in a row */
- .box {
- display: block;
- text-align: center;
- }
- .box .dojoButton {
- margin-right: 10px;
- }
- .dojoButtonContents {
- font-size: 1.6em;
- }
-
-
- .dojoMenuItem2Disabled .dojoMenuItem2Label span,
- .dojoMenuItem2Disabled .dojoMenuItem2Accel span {
- color: ThreeDShadow;
- }
-
- .dojoMenuItem2Disabled .dojoMenuItem2Label span span,
- .dojoMenuItem2Disabled .dojoMenuItem2Accel span span {
- color: ThreeDHighlight;
- }
- </style>
- </HEAD>
- <body class="tundra">
- <form action="editExc.jsp" name="form1" 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 align="right" width="28%">配置编号 <span class="redcolor">*</span> </td>
- <td align="left" width="72%">
- <input dojotype="dijit.form.NumberSpinner"
- id="classid" name="classid"
- value="<%=classid %>"
- constraints="{min: 0, max:3000, places:0}"
- size=10
- invalidMessage="配置编号必须录入数字!" <%if(action.equals("edit")){ %> readonly<%} %>>
- </td>
- </tr>
- <tr>
- <td align="right">是否在用 <span class="redcolor">*</span> </td>
- <td align="left">
- <select dojoType="dijit.form.FilteringSelect" required="true" name="validate" id="validate" autocomplete="true">
- <option value="true" <%if(validate.equals("true")) out.print("selected");%>>true</option>
- <option value="false" <%if(validate.equals("false")) out.print("selected");%>>false </option>
- </select>
- </td>
- </tr>
- <tr>
- <td align="right">数据链接 <span class="redcolor">*</span> </td>
- <td align="left">
- <select dojoType="dijit.form.FilteringSelect" required="true" name="dataSource" id="dataSource" autocomplete="true">
- <option></option>
- <%
- ArrayList listsource = sysmodel.getMdpDataSources();
- MdpDataSourceImpl MdpDataSource = new MdpDataSourceImpl();
- for(int i = 0 ; i < listsource.size(); i ++){
- MdpDataSource = (MdpDataSourceImpl)listsource.get(i);
- String id =String.valueOf(MdpDataSource.getDataSourceid());
- %>
- <option value="<%=id %>" <%if(dataSource.equals(id)) out.print("selected"); %> ><%=MdpDataSource.getURL()%></option>
- <%
- }
- %>
- </select>
- </td>
- </tr>
- <tr>
- <td align="right">中文名字 <span class="redcolor">*</span> </td>
- <td align="left">
- <input type="text" value="<%=description %>"
- id="description" name="description" class="medium"
- dojoType="dijit.form.ValidationTextBox"
- required="true"
- ucfirst="true"
- invalidMessage="中文名字必须录入!">
- </td>
- </tr>
- <tr>
- <td align="right">英文名字 <span class="redcolor">*</span> </td>
- <td align="left">
- <input type="text" value="<%=name %>"
- id="name" name="name" class="medium"
- dojoType="dijit.form.ValidationTextBox"
- required="true"
- regExp="^[A-Za-z0-9$_]+$"
- invalidMessage="英文名字格式错误,必填项!">
- </td>
- </tr>
- <tr>
- <td align="right">是否生成到库 </td>
- <td align="left">
- <select dojoType="dijit.form.FilteringSelect" name="exist" id="exist" autocomplete="true">
- <option value="true" <%if(exist.equals("true")) out.print("selected");%>>true</option>
- <option value="false" <%if(exist.equals("false")) out.print("selected");%>>false </option>
- </select>
- </td>
- </tr>
- <tr>
- <td align="right">所属模块 <span class="redcolor">*</span> </td>
- <td align="left">
- <select dojoType="dijit.form.FilteringSelect" required="true" name="type" id="type" autocomplete="true">
- <%
- ArrayList mod = sysmodel.getMdpModules();
- MdpModuleImpl MdpModule = new MdpModuleImpl();
- for(int i = 0 ; i < mod.size(); i ++){
- MdpModule = (MdpModuleImpl)mod.get(i);
- String id =String.valueOf(MdpModule.getCode());
- %>
- <option value="<%=id %>" <%if(id.equals(type)) out.print("selected"); %> ><%=MdpModule.getName() %></option>
- <%
- }
- %>
- </select>
- </td>
- </tr>
- <tr>
- <td align="right">是否缓存 </td>
- <td align="left">
- <select dojoType="dijit.form.FilteringSelect" name="catche" id="catche" autocomplete="true">
- <option value="true" <%if(catche.equals("true")) out.print("selected");%>>true</option>
- <option value="false" <%if(catche.equals("false")) out.print("selected");%>>false </option>
- </select>
- </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>
|