123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398 |
- <%@ page pageEncoding="UTF-8"%>
- <%@ page contentType="text/html; charset=UTF-8" language="java" %>
- <%@ page
- import ="java.util.*"%>
- <%@ page language="java"
- import="com.sysmodel.XFormFactory,
- com.sysmodel.listmodel.xmlmodel.impl.FormListImpl,
- com.sysmodel.listmodel.xmlmodel.able.QueryList,
- com.sysmodel.listmodel.xmlmodel.impl.ListFieldImpl,
- com.sysmodel.listmodel.xmlmodel.impl.QueryFieldImpl"%>
- <%!
- private String produceControl(QueryFieldImpl field) {
- return field.getControl().produceHtml(field.getDataName(), "","",field.getValidate());
- }
- %>
- <%
- String listid = request.getParameter("listid") == null ? "" : request.getParameter("listid");
- String sessionReload = request.getParameter("sessionReload") == null ? "false" : request.getParameter("sessionReload");
-
- FormListImpl FormList = null;
- if(session.getAttribute("FormList"+listid) == null || sessionReload.equals("true")){
- if(!listid.equals("")){
- FormListImpl FormListold =(FormListImpl)XFormFactory.getXFormModel().getFormList(listid);
- FormList = (FormListImpl)FormListold.clone();
- session.setAttribute("FormList"+listid,FormListold.clone());
- } else{
- return;
- }
- } else {
- FormList = (FormListImpl)session.getAttribute("FormList"+listid);
- }
- %>
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
- <html>
- <HEAD>
- <script type="text/javascript">
- function openDesiner(ulr,width,height){
- window.open(ulr+"?listid=<%=listid%>",'',"'width="+width+",height="+height+"'");
- }
- </script>
- <TITLE></TITLE>
- <META http-equiv="Content-Type" content="text/html; charset=utf-8">
- <link rel="stylesheet" href="../../../styles/css.css" type="text/css">
- <link rel="stylesheet" href="../../../styles/contextMenu.css" type="text/css"></link>
- <script type="text/javascript" src="../../../scripts/contextMenu.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.FilteringSelect");
- 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";
- </style>
- <script type="text/javascript">
- var selectTdObj;
- function makeMenu(){
- var myMenu, item;
- myMenu = new contextMenu();
- item = new contextItem("修改", "../../../images/button/edit.gif", "editObj();", "menu");
- myMenu.addItem(item);
- item = new contextItem("删除", "../../../images/button/delete.gif", "deleteObj();", "menu");
- myMenu.addItem(item);
- item = new contextItem("", "", "", "separator");
- myMenu.addItem(item);
- item = new contextItem("刷新", "../../../images/button/refresh.gif", "window.location.reload();", "menu");
- myMenu.addItem(item);
- myMenu.show(this.document);
- delete item;
- delete myMenu;
- }
- function deleteObj(){
- if(confirm("确定要删除吗?")){
- var type = selectTdObj.type;
-
- if(type == "pagesize"){
- location.href="designExc.jsp?listid=<%=listid%>&deltype=" + type;
- }
-
- else if(type == "pageorder"){
- location.href="designExc.jsp?listid=<%=listid%>&deltype=" + type;
- }
-
- else if(type == "queryfield"){
-
- location.href="designExc.jsp?listid=<%=listid%>&deltype=" + type
- +"&classid="+selectTdObj.classid
- +"&fieldname="+selectTdObj.fieldname
- +"&operator="+selectTdObj.operator;
- }
-
- else if(type == "pagetier"){
-
- location.href="designExc.jsp?listid=<%=listid%>&deltype=" + type
- +"&classid="+selectTdObj.classid
- +"&fieldname="+selectTdObj.fieldname
- +"&fieldlabel="+selectTdObj.fieldlabel;
- }
- }
- }
- function editObj(){
- var type = selectTdObj.type;
- var dataName = selectTdObj.fieldname;
- var classid = selectTdObj.classid;
- var controltype = selectTdObj.controltype;
- var fieldlabel = selectTdObj.fieldlabel;
- var url = "listid=<%=listid%>&dataName="+dataName+"&classid="+classid+"&label="+fieldlabel+"&controltype="+controltype;
-
-
- if(type == "pagesize"){
- openDesiner('../design/TableAtt.jsp','200','400');
- }
-
- else if(type == "pageorder"){
- openDesiner('../design/TableAtt.jsp','200','400');
- }
-
- else if(type == "queryfield"){
- var controltype = selectTdObj.controltype;
- if(controltype == "text"){
- window.open("../design/text.jsp?"+url,'',"'width=400,height=500'");
- } else if(controltype == "date"){
- window.open("../design/date.jsp?"+url,'',"'width=400,height=500'");
- } else if(controltype == "tree"){
- window.open("../design/tree.jsp?"+url,'',"'width=400,height=500'");
- } else if(controltype == "select"){
- window.open("../design/select.jsp?"+url,'',"'width=400,height=500'");
- }
- }
- else if(type == "pagetier"){
- var dataName = selectTdObj.fieldname;
- var classid = selectTdObj.classid;
- var fieldlabel = selectTdObj.fieldlabel;
- var showType = selectTdObj.showType
- url = "listid=<%=listid%>&dataName="+dataName+"&classid="+classid+"&label="+fieldlabel+"&showType="+showType;
- window.open("../design/tier.jsp?"+url,'',"'width=400,height=500'");
- }
- }
- makeMenu();
- document.onclick = hideMenu;
- function saveConfig(){
- if(confirm("确定要发布应用吗?")){
- location.href="designExc.jsp?listid=<%=listid%>&doaction=save";
- }
- }
- function reloadConfig(){
- if(confirm("确定要恢复原来的配置吗?")){
- location.href="designExc.jsp?listid=<%=listid%>&doaction=reload";
- }
- }
- //-->
- </script>
- <script type="text/javascript" src="../../../scripts/calendar/calendar.js"></script>
- <link rel="stylesheet" href="../../../scripts/calendar/calendar-blue.css" type="text/css"></link>
- <script type="text/javascript" src="../../../scripts/calendar/calendar-zh.js"></script>
- </HEAD>
- <body class="tundra" oncontextmenu="if(!event.ctrlKey){return false} else {return true}">
- <form action="">
- <div style="position: absolute; width:8%; height:65%;top:8px; left:10; border: 1px solid #999999; overflow:auto;" id="layer1">
- <table align="center">
- <tr>
- <td width="20">
- <img src="../../../images/tool/save.gif" id="tsave" onclick="saveConfig();"></img>
- <span dojoType="dijit.Tooltip" connectId="tsave">发布到客户端</span>
- </td>
- <td width="20">
- <img src="../../../images/tool/undo.gif" id="tundo" onclick="reloadConfig();"></img>
- <span dojoType="dijit.Tooltip" connectId="tundo">撤销到系统在用的设计</span>
- </td>
- </tr>
- <tr>
- <td>
- <img src="../../../images/tool/htmltab.gif" id="htmltab" onclick="openDesiner('../design/TableAtt.jsp','200','400');"></img>
- <span dojoType="dijit.Tooltip" connectId="htmltab">列表表单属性</span>
- </td>
- <td></td>
- </tr>
- <tr><td colspan="2"> </td></tr>
- <tr>
- <td>
- <img src="../../../images/tool/select.gif" id="select" onclick="openDesiner('../design/select.jsp','400','500');"></img>
- <span dojoType="dijit.Tooltip" connectId="select">定义选择查询构件</span>
- </td>
- <td></td>
- </tr>
- <tr>
- <td>
- <img src="../../../images/tool/date.gif" id="date" onclick="openDesiner('../design/date.jsp','400','500');"></img>
- <span dojoType="dijit.Tooltip" connectId="date">定义日期查询构件</span>
- </td>
- <td></td>
- </tr>
- <tr>
- <td>
- <img src="../../../images/tool/text.gif" id="text" onclick="openDesiner('../design/text.jsp','400','500');"></img>
- <span dojoType="dijit.Tooltip" connectId="text">定义文本框查询构件</span>
- </td>
- <td></td>
- </tr>
- <tr>
- <td>
- <img src="../../../images/tool/tree.gif" id="tree" onclick="openDesiner('../design/tree.jsp','400','500');"></img>
- <span dojoType="dijit.Tooltip" connectId="tree">定义树形查询构件</span>
- </td>
- <td></td>
- </tr>
- <tr>
- <td>
- <img src="../../../images/tool/sort.gif" id="sortqf" onclick="openDesiner('../design/SerchOutSort.jsp','400','500');"></img>
- <span dojoType="dijit.Tooltip" connectId="sortqf">排序查询构件</span>
- </td>
- <td></td>
- </tr>
- <tr><td colspan="2"> </td></tr>
- <tr>
- <td>
- <img src="../../../images/tool/dataset.gif" id="dataset" onclick="openDesiner('../design/tier.jsp','400','500');"></img>
- <span dojoType="dijit.Tooltip" connectId="dataset">定义列表字段</span>
- </td>
- <td></td>
- </tr>
- <tr>
- <td>
- <img src="../../../images/tool/sort.gif" id="sortqlf" onclick="openDesiner('../design/OutSort.jsp','400','500');"></img>
- <span dojoType="dijit.Tooltip" connectId="sortqlf">排序列表字段</span>
- </td>
- <td></td>
- </tr>
- </table>
- </div>
-
-
- <div style="position: absolute; width:90%; height:auto;top:10; left:90; border: 1px solid #999999; overflow:auto;" align="center" id="layer1">
- <br><br>
- <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">
- <%
- if(FormList.getListHead() != null)
- out.print(FormList.getListHead().getTitle());
- %></div>
- <div class="clear"></div>
- </div>
- </div>
- <div class="report">
- <%
- try{
- String LineCssA = XFormFactory.getXFormModel().getCSSValue("LineCssA");
- String LineCssB = XFormFactory.getXFormModel().getCSSValue("LineCssB");
- ArrayList queryFields = FormList.getQueryFields();
- if(queryFields.size() > 0){
- %>
- <table align="center" id="SortTable" width="<%=FormList.getListWidth()%>" cellpadding="1" cellspacing="1" class="<%=XFormFactory.getXFormModel().getCSSValue("TableCss") %>">
- <%
- int iRowField = 2;
- for (int i = 0; i < queryFields.size(); i++) {
- QueryFieldImpl field = (QueryFieldImpl)queryFields.get(i);
- if(i%iRowField == 0){
- if(i != 0) out.print("</tr>");
- %><tr>
- <%}
- %>
- <td width="15%" align="right"
- type="queryfield" classid="<%=field.getClassid() %>" fieldname="<%=field.getDataName() %>"
- operator="<%=field.getOperator()%>" controltype="<%=field.getControlType()%>"
- classid="<%=field.getClassid()%>" fieldlabel = "<%=field.getLabel()%>"
- onMouseUp="rightUp(this);"
- onmouseover="tdchangeStyle(this, 'on');"
- onmouseout="tdchangeStyle(this, 'out');"><%=field.getLabel() %></td>
- <td width="35%" align="left" nowrap>
- <%=produceControl(field) %>
- </td>
- <%}
- int imod = queryFields.size() % iRowField;
- if(imod !=0){
- out.print("<td colspan="+ (imod * 2) +" ></td>");
- out.print("</tr>");
- }
- %>
- <tr class="<%=XFormFactory.getXFormModel().getCSSValue("ActionRowCss")%>">
- <td colspan="4" align="right">
- <input type="button" style='CURSOR:hand' class="button" value="查询"/>
- <input type="button" style='CURSOR:hand' class="button" value="重置" onClick="document.form1.reset();"/>
-
- </td>
- </tr>
- </table>
- <%
- }
-
- QueryList QueryList = FormList.getQueryList();
- if(QueryList != null){
- %>
- <table align="center" id="SortTable" width="<%=FormList.getListWidth()%>" cellpadding="1" cellspacing="1" class="<%=XFormFactory.getXFormModel().getCSSValue("TableCss") %>">
- <thead>
- <tr class="<%=XFormFactory.getXFormModel().getCSSValue("ListTableHeadCss")%>">
- <%
- if(QueryList.isHaveOrder()){
- %>
- <td width="35" type="pageorder"
- onMouseUp="rightUp(this);" onmouseover="tdchangeStyle(this, 'on');"
- onmouseout="tdchangeStyle(this, 'out');">序号</td>
- <%
- }
- ArrayList list = QueryList.getlistFields();
- for(int i = 0; i < list.size(); i ++){
- ListFieldImpl ListField = (ListFieldImpl)list.get(i);
- %>
- <td width="<%=ListField.getWidth() %>" type="pagetier"
- classid="<%=ListField.getClassid() %>"
- fieldname="<%=ListField.getDataName() %>" showType="<%=ListField.getShowType() %>" fieldlabel="<%=ListField.getLabel()%>"
- onMouseUp="rightUp(this);" onmouseover="tdchangeStyle(this, 'on');"
- onmouseout="tdchangeStyle(this, 'out');"><%=ListField.getLabel() %></td>
- <%
- }
- %>
- </tr>
- </thead>
- <tbody>
- <%
- for(int i = 0; i <= 5 ; i ++){
- %>
- <tr height="26" class="<%if(i%2 ==0) out.print(LineCssA);else out.print(LineCssB); %>">
- <%
- if(QueryList.isHaveOrder()){
- %><td><%=i+1 %></td><%
- }
- for(int j = 0; j < list.size(); j ++){
-
- ListFieldImpl ListField = (ListFieldImpl)list.get(j);
- String showTire = " ";
- if(ListField.getShowType().equals("1")){
- showTire="<a href=\"" +request.getContextPath() + ListField.getUrl() + "\" class=\"WLink\" target=\"\">"+
- "<img src=\""+ ListField.getImage() +"\" border=\"0\"/></a>";
- }
- if(ListField.getShowType().equals("2")){
- showTire="<a href=\"" + request.getContextPath() + ListField.getUrl() + "\" target=\"\">"+ ListField.getShowTxt() +"</a>";
- }
- %><td><%=showTire %></td><%
- }
- %>
- </tr>
- <%}%>
- </tbody>
- </table>
- <%if(QueryList.getPageSize() > 0){ %>
- <DIV class=Paginator>
- <table width="100%" border="0" cellpadding="0" cellspacing="0" class="ltab2">
- <tr>
- <td height="28" align="center"
- valign="middle" nowrap class="DefTxtCss"
- onmouseover="tdchangeStyle(this, 'on');" onmouseout="tdchangeStyle(this, 'out');"
- type="pagesize"
- onMouseUp="rightUp(this);"> 共 *** 条 | 1/13 页 | 每页显示
- <input type="text" name="PageNum" id="PageNum" value="<%=QueryList.getPageSize() %>" style="width: 40px"> 条 | 跳转至第
- <input type="text" name="PageCurr" id="PageCurr" value="1" style="width: 40px"> 页
- <a href='#' onClick="javascript:void(0);">1</a>
- <a href='#' onClick="javascript:void(0);">2</a>
- <a href='#' onClick="javascript:void(0);">3</a>
- <a href='#' onClick="javascript:void(0);">4</a>
- <a href='#' onClick="javascript:void(0);">></a>
- <a href='#' onClick="javascript:void(0);">>></a></td>
- </tr>
- </table>
- </DIV>
- <%
- }
- }
-
- } catch(Exception e ){
-
- }
- %>
- </div>
- </div>
- <br>
- </div>
- </form>
- </body>
- </html>
|