123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256 |
- <%@ 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.datamodel.xmlmodel.impl.MdpAttributeImpl,
- com.sysmodel.listmodel.xmlmodel.impl.QueryFieldImpl,
- com.sysmodel.xformmodel.able.Validate,
- com.sysmodel.xformmodel.impl.DojoInputTypeImpl,
- com.sysmodel.XFormModelImpl,
- com.sysmodel.xformmodel.impl.RegExpImpl"%>
- <!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 dojoInuptType = "";
- String operator = "";
- String action = "add";
- String regxValue = "";
- FormListImpl FormList = null;
- ArrayList QueryFields=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)){
- operator = QueryFieldImpl.getOperator();
- Validate Validate = QueryFieldImpl.getValidate();
- dojoInuptType =Validate.getDojoType();
- regxValue = Validate.getRegxValue();
- }
- }
-
- }
-
- 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="定义选择查询构件">
- <script type="text/javascript" src="../../../scripts/creatselect.js"></script>
- <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/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="SelectExc.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>
- <td width="15%">表名: <font color="red">*</font></td>
- <td align="left" >
- <select id="classid" name="classid" onChange="getTable(this,dojo.byId('dataName'),'constant')"
- dojoType="dijit.form.FilteringSelect"
- autocomplete="true" invalidMessage="表名必须填写!">
- <option value=" "></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>
- <td>字段: <font color="red">*</font></td>
- <td align="left" ><select name="dataName" id="dataName"
- invalidMessage="字段必须填写!">
- <option value="0" 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>
- <td>标题: <font color="red">*</font></td>
- <td align="left"><input type="text" id="label" name="label" class="medium"
- dojoType="dijit.form.ValidationTextBox"
- required="true"
- ucfirst="true"
- value="<%=label %>"
- invalidMessage="标题必须填写!"/></td>
- </tr>
- <tr>
- <td>操作类型:</td>
- <td align="left" ><select name="operator" dojoType="dijit.form.FilteringSelect"
- id="operator" autocomplete="true">
- <option value="0"></option>
- <option value="like" <%if(operator.equals("like")) out.print("selected"); %> >like</option>
- <option value="equals" <%if(operator.equals("equals")) out.print("selected"); %>>equals</option>
- <option value="morethan" <%if(operator.equals("morethan")) out.print("selected"); %>>大于等于</option>
- <option value="lessthan" <%if(operator.equals("lessthan")) out.print("selected"); %>>小于等于</option>
- </select></td>
- </tr>
- <tr class="">
- <td>dojo]控件类型</td>
- <td align="left">
- <select id="dojoInuptType" name="dojoInuptType"
- dojoType="dijit.form.FilteringSelect">
- <option value="0">--请选择--</option>
- <% ArrayList dojoInuptTypes = XFormModelImpl.getInstance().getDojoInuptTypesByType("text");
- for(int m = 0; m<dojoInuptTypes.size(); m++){
- DojoInputTypeImpl DojoInputTypeImpl=(DojoInputTypeImpl)dojoInuptTypes.get(m);
- %>
- <option value="<%=DojoInputTypeImpl.getCode() %>" <%if(DojoInputTypeImpl.getCode().equals(dojoInuptType))out.print("selected");%>><%=DojoInputTypeImpl.getName() %></option>
- <%} %>
- </select>
- </td>
- </tr>
- <tr class="">
- <td>正则表达式</td>
- <td align="left"><select id="regxValue" name="regxValue"
- dojoType="dijit.form.FilteringSelect">
- <option value="0">--请选择--</option>
- <% ArrayList regExps=XFormModelImpl.getInstance().getRegExps();
- for(int j = 0; j<regExps.size(); j++){
- RegExpImpl RegExpImpl=(RegExpImpl)regExps.get(j);
- %>
- <option value="<%=RegExpImpl.getCode() %>" <%if(RegExpImpl.getCode().equals(regxValue))out.print("selected");%>><%=RegExpImpl.getName() %></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>
|