5316b74b7a8aa875e8c6e94a8be5c0e271192e6a.svn-base 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234
  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.XFormFactory,
  6. com.sysmodel.listmodel.xmlmodel.impl.FormListImpl,
  7. com.sysmodel.datamodel.xmlmodel.ModelFactory,
  8. com.sysmodel.datamodel.xmlmodel.impl.MdpClassImpl,
  9. com.sysmodel.datamodel.xmlmodel.able.SysModel,
  10. com.sysmodel.listmodel.xmlmodel.impl.PramFieldImpl"%>
  11. <%@page import="com.sysmodel.datamodel.xmlmanager.xmlobjdll.SysModeldllable"%>
  12. <%
  13. String listid = request.getParameter("listid") == null ? "" : request.getParameter("listid");
  14. FormListImpl FormList =(FormListImpl)XFormFactory.getXFormModel().getFormList(listid);
  15. ArrayList tableList = FormList.getQueryTables();
  16. %>
  17. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  18. <HTML>
  19. <HEAD>
  20. <TITLE></TITLE>
  21. <META http-equiv="Content-Type" content="text/html; charset=GB2312">
  22. <link rel="stylesheet" href="../../../../../styles/css.css" type="text/css">
  23. <script language="JavaScript">
  24. var XMLHttpReq;
  25. var currentSort;
  26. function createXMLHttpRequest() {
  27. if(window.XMLHttpRequest) {
  28. XMLHttpReq = new XMLHttpRequest();
  29. }
  30. else if (window.ActiveXObject) {
  31. try {
  32. XMLHttpReq = new ActiveXObject("Msxml2.XMLHTTP");
  33. } catch (e) {
  34. try {
  35. XMLHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
  36. } catch (e) {}
  37. }
  38. }
  39. }
  40. function sendRequest(url) {
  41. createXMLHttpRequest();
  42. XMLHttpReq.open("GET", url, true);
  43. XMLHttpReq.onreadystatechange = processResponse;
  44. XMLHttpReq.send(null);
  45. }
  46. function processResponse() {
  47. if (XMLHttpReq.readyState == 4) {
  48. if (XMLHttpReq.status == 200) {
  49. updateMenu();
  50. } else {
  51. alert("您所请求的页面有异常。");
  52. }
  53. }
  54. }
  55. function getTable(obj, selectName){
  56. if(obj.value=="")return;
  57. var strA = "";
  58. createXMLHttpRequest();
  59. axo = new ActiveXObject("Microsoft.XMLDOM");
  60. XMLHttpReq.open("POST","getAttributeXml.jsp?classid="+obj.getValue()+"",false);
  61. XMLHttpReq.setRequestHeader("Content-Length",strA.length);
  62. XMLHttpReq.setRequestHeader("Content-type","application/x-www-form-urlencoded");
  63. XMLHttpReq.send(strA);
  64. axo.loadXML(XMLHttpReq.responseText);
  65. n1 = axo.selectNodes("/root/name");
  66. n2 = axo.selectNodes("/root/description");
  67. BuildSel(unescape(XMLHttpReq.responseText),selectName, n1, n2);
  68. }
  69. function BuildSel(str,sel,id,name) {
  70. sel.options.length=0;
  71. if(id.length == 0) {
  72. sel.options[sel.options.length] = new Option('')
  73. return;
  74. }
  75. var arrstr = new Array();
  76. arrstr = str.split(",");
  77. for(var i=0;i<id.length;i++) {
  78. sel.options[sel.options.length] = new Option(name(i).text,id(i).text);
  79. }
  80. }
  81. </script>
  82. <script type="text/javascript" src="../../../../../scripts/dojo/dojo/dojo.js"
  83. djConfig="isDebug: false, parseOnLoad: true"></script>
  84. <script type="text/javascript">
  85. dojo.require("dijit.form.Form");
  86. dojo.require("dijit.form.FilteringSelect");
  87. dojo.require("dijit.form.Button");
  88. dojo.require("dijit.Tooltip");
  89. </script>
  90. <style type="text/css">
  91. @import "../../../../../scripts/dojo/dojo/resources/dojo.css";
  92. @import "../../../../../scripts/dojo/dijit/themes/tundra/tundra.css";
  93. @import "../../../../../scripts/dojo/dijit/themes/tundra/tundra_rtl.css";
  94. @import "../../../../../scripts/dojo/dijit/tests/css/dijitTests.css";
  95. .formQuestion {
  96. background-color:#d0e3f5;
  97. padding:0.3em;
  98. font-weight:900;
  99. font-family:Verdana, Arial, sans-serif;
  100. font-size:0.8em;
  101. color:#5a5a5a;
  102. }
  103. .formAnswer {
  104. background-color:#f5eede;
  105. padding:0.3em;
  106. margin-bottom:1em;
  107. width: 100%;
  108. }
  109. .pageSubContentTitle {
  110. color:#8e8e8e;
  111. font-size:1em;
  112. font-family:Verdana, Arial, sans-serif;
  113. margin-bottom:0.75em;
  114. }
  115. .small INPUT {
  116. width: 2.5em;
  117. }
  118. .medium INPUT {
  119. width: 10em;
  120. }
  121. .long INPUT {
  122. width: 20em;
  123. }
  124. .firstLabel {
  125. display: inline-block;
  126. display: -moz-inline-box;
  127. width: 10em;
  128. min-width: 10em;
  129. }
  130. .secondLabel {
  131. width: auto;
  132. margin-left: 5em;
  133. margin-right: 1em;
  134. }
  135. fieldset label {
  136. margin-right: 1em;
  137. }
  138. .noticeMessage {
  139. display: block;
  140. float: right;
  141. font-weight: normal;
  142. font-family:Arial, Verdana, sans-serif;
  143. color:#663;
  144. font-size:0.9em;
  145. }
  146. </style>
  147. </HEAD>
  148. <body class="tundra">
  149. <form action="editExc.jsp" method="post">
  150. <input type="hidden" value="add" name="action">
  151. <input type="hidden" value="<%= listid%>" name="listid">
  152. <div id=total>
  153. <div class="whiteborder">
  154. <div class="titback">
  155. <div class="floatleft"><img src="../../../../../images/index/arrow1.gif" width="20" height="24"/></div>
  156. <div class="dropshadow">列表参数定义</div>
  157. <div class="clear"></div>
  158. </div>
  159. <div class="report">
  160. <table align="center" id="SortTable512_1" width="100%" cellpadding="1" cellspacing="1" class="ltab2">
  161. <tr>
  162. <td width="40%" align="right">参数名&nbsp;<span class="redcolor">*</span>&nbsp;&nbsp;</td>
  163. <td width="60%" align="left">
  164. <input type="text" id="name" name="name" class="medium"
  165. dojoType="dijit.form.ValidationTextBox"
  166. required="true"
  167. ucfirst="true"/>
  168. </td>
  169. </tr>
  170. <tr>
  171. <td align="right">FROM表&nbsp;<span class="redcolor">*</span>&nbsp;&nbsp;</td>
  172. <td align="left">
  173. <select name="classid" onChange="getTable(this, dojo.byId('valuefrom'))"
  174. dojoType="dijit.form.FilteringSelect"
  175. required="true" id="classid" autocomplete="true">
  176. <option value="0"></option>
  177. <%
  178. for(int i = 0 ; i < tableList.size(); i ++){
  179. String classid = (String)tableList.get(i);
  180. int iclassid = Integer.parseInt(classid);
  181. SysModel sysmodel = ModelFactory.getSysmodel();
  182. MdpClassImpl MdpClass = (MdpClassImpl)sysmodel.getMdpClassByClassID(iclassid);
  183. %>
  184. <option value="<%=classid %>"><%=MdpClass.getDescription()%></option>
  185. <%
  186. }
  187. %>
  188. </select></td>
  189. </tr>
  190. <tr>
  191. <td align="right">FROM字段&nbsp;<span class="redcolor">*</span>&nbsp;&nbsp;</td>
  192. <td align="left">
  193. <select name="valuefrom" id="valuefrom">
  194. </select></td>
  195. </tr>
  196. <tr >
  197. <td align="right">是否提交用&nbsp;&nbsp;&nbsp;</td>
  198. <td align="left">
  199. <select name="isinput"
  200. dojoType="dijit.form.FilteringSelect"
  201. required="true" id="isinput" autocomplete="true">
  202. <option value="true">true</option>
  203. <option value="false">false</option>
  204. </select></td>
  205. </tr>
  206. </table>
  207. </div>
  208. <div class="btmbox">
  209. <button id="save" dojoType="dijit.form.Button" onClick='console.log("clicked simple")' type="submit" iconClass="plusIcon">
  210. 保存
  211. </button>
  212. <span dojoType="dijit.Tooltip" connectId="save">保存按钮</span>&nbsp;&nbsp;
  213. </div
  214. ></div>
  215. </div>
  216. </form>
  217. </BODY>
  218. </HTML>