123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239 |
- <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
- <%@ page language="java"
- import="java.util.*,
- com.sysmodel.listmodel.xmlmodel.impl.FormListImpl,
- com.sysmodel.datamodel.xmlmodel.ModelFactory,
- com.sysmodel.datamodel.xmlmodel.impl.MdpClassImpl,
- com.sysmodel.datamodel.xmlmodel.able.SysModel,
- com.sysmodel.listmodel.xmlmodel.impl.QueryFieldImpl,com.sysmodel.xformmodel.importcontrol.TreeControl,
- com.sysmodel.datamodel.xmlmodel.impl.MdpAttributeImpl"%>
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
- <html>
- <head>
- <%
- String listid = request.getParameter("listid") == null ? "" : request.getParameter("listid");
- String dataName = request.getParameter("dataName") == null ? "" : request.getParameter("dataName");
- String label = request.getParameter("label") == null ? "" : request.getParameter("label");
- String classid = request.getParameter("classid") == null ? "0" : request.getParameter("classid");
- String size = "";
- String action = "add";
- String operator = "";
- ArrayList QueryFields = null;
- FormListImpl FormList = null;
- ArrayList tableList = null;
-
- if(session.getAttribute("FormList"+listid) == null){
- return;
- } else {
- FormList = (FormListImpl)session.getAttribute("FormList"+listid);
- tableList = FormList.getQueryTables();
- QueryFields = FormList.getQueryFields();
- for (int i = 0 ; i < QueryFields.size() ; i++){
- QueryFieldImpl QueryFieldImpl = (QueryFieldImpl)QueryFields.get(i);
- if(QueryFieldImpl.getDataName().equals(dataName) && QueryFieldImpl.getLabel().equals(label)){
- TreeControl TreeControl = (TreeControl)QueryFieldImpl.getControl();
- operator = QueryFieldImpl.getOperator();
- size = TreeControl.getSize();
- classid = QueryFieldImpl.getClassid() + "";
- }
- }
-
- }
-
- if(!dataName.equals("") && !classid.equals("0")){
- action = "edit";
- }
- %>
-
- <title>定义树形查询构件</title>
-
- <meta http-equiv="pragma" content="no-cache">
- <meta http-equiv="cache-control" content="no-cache">
- <meta http-equiv="expires" content="0">
- <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
- <meta http-equiv="description" content="定义树形查询构件">
-
- <link rel="stylesheet" href="../../../styles/css.css" type="text/css"></link>
- <link rel="stylesheet" href="../../../styles/style.css" type="text/css"></link>
- <script type="text/javascript" src="../../../scripts/creatselect.js"></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.ComboBox");
- dojo.require("dijit.form.FilteringSelect");
- dojo.require("dijit.form.NumberSpinner");
- dojo.require("dijit.form.Button");
- dojo.require("dijit.Tooltip");
-
- </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>
- </head>
-
- <body class="tundra">
- <form name="form1" method="post" action="TreeExc.jsp">
- <input type="hidden" name="listid" value="<%=listid %>">
- <input type="hidden" name="action" value="<%=action %>">
- <input type="hidden" name="oDataName" value="<%=dataName %>">
- <input type="hidden" name="oLabel" value="<%=label %>">
-
- <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 border="0" align="center" width="100%" cellpadding="1" cellspacing="1" class="ltab2">
- <tr class="">
- <td width="15%">表名</td>
- <td align="left" ><select id="classid" name="classid" onChange="getTable(this,dojo.byId('dataName'),'constant')"
- dojoType="dijit.form.FilteringSelect"
- autocomplete="true">
- <option value="0"></option>
- <%
- for(int i = 0 ; i < tableList.size(); i ++){
- int iclassid = Integer.parseInt((String)tableList.get(i));
- SysModel sysmodel = ModelFactory.getSysmodel();
- MdpClassImpl MdpClass = (MdpClassImpl)sysmodel.getMdpClassByClassID(iclassid);
- %>
- <option value="<%=iclassid %>" <%if(classid.equals((String)tableList.get(i)))out.print("selected"); %>><%=MdpClass.getDescription()%></option>
- <%}%>
- </select></td>
- </tr>
- <tr class="">
- <td>字段</td>
- <td align="left" ><select name="dataName" id="dataName">
- <option selected>请选择字段</option>
- <%
- if(!dataName.equals("") && (!classid.equals("0"))){
- SysModel sysmodel = ModelFactory.getSysmodel();
- MdpClassImpl MdpClass = (MdpClassImpl)sysmodel.getMdpClassByClassID(Integer.parseInt(classid));
- ArrayList list = (ArrayList)MdpClass.getAllMdpAttributes();
- for(int i = 0 ; i < list.size(); i ++){
- MdpAttributeImpl MdpAttribute = (MdpAttributeImpl) list.get(i);
- %>
- <option value="<%=MdpAttribute.getName() %>" <%if(dataName.equals(MdpAttribute.getName()))out.print("selected") ;%>><%=MdpAttribute.getDescription()%></option>
- <%}}%>
- </select></td>
- </tr>
- <tr class="">
- <td>标题</td>
- <td align="left"><input type="text" id="label" name="label" class="medium"
- dojoType="dijit.form.ValidationTextBox"
- required="true"
- ucfirst="true"
- value="<%=label %>"/></td>
- </tr>
- <tr class="">
- <td>操作类型</td>
- <td align="left" ><select name="operator" dojoType="dijit.form.FilteringSelect"
- required="true" id="operator" autocomplete="true">
- <option value="0"></option>
- <option value="like" <%if(operator.equals("like"))out.println("selected"); %>>like</option>
- <option value="equals" <%if(operator.equals("equals"))out.println("selected"); %>>equals</option>
- <option value="morethan" <%if(operator.equals("morethan"))out.println("selected"); %>>大于等于</option>
- <option value="lessthan" <%if(operator.equals("lessthan"))out.println("selected"); %>>小于等于</option>
- </select></td>
- </tr>
- <tr class="">
- <td>size</td>
- <td align="left"><input type="text" id="size" name="size" class="medium"
- dojoType="dijit.form.ValidationTextBox"
- required="true"
- ucfirst="true"
- value="<%=size %>"/></td>
- </tr>
- <tr class="">
- <td>leafonly</td>
- <td align="left">
- <select name="leafonly" dojoType="dijit.form.FilteringSelect"
- required="true" id="leafonly" autocomplete="true">
- <option value="false" <%if(size.equals("false")) out.print("selected");%>>false</option>
- <option value="true" <%if(size.equals("true")) out.print("selected");%>>true</option>
- </select>
- </td>
- </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>
-
- <button id="re" dojoType="dijit.form.Button" onClick='console.log("clicked simple")' type="reset" iconClass="plusIcon">
- 重置
- </button>
- <span dojoType="dijit.Tooltip" connectId="re">重置按钮</span>
-
- <button id="clo" dojoType="dijit.form.Button" onClick='console.log("clicked simple"),window.close();' type="button" iconClass="plusIcon">
- 关闭
- </button>
- <span dojoType="dijit.Tooltip" connectId="clo">关闭按钮</span>
- </div>
- </div>
- </div>
- </form>
- <br>
- </body>
- </html>
|