list_exc.jsp 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <%@ page pageEncoding="UTF-8"%>
  2. <%@ page contentType="text/html; charset=UTF-8" language="java" %>
  3. <%@ page
  4. import ="java.util.*"%>
  5. <%@ page language="java"
  6. import="com.sysmodel.XFormFactory"%>
  7. <%
  8. request.setCharacterEncoding("GBK");
  9. List list = XFormFactory.getXFormModel().getFormLists();
  10. String moduleType = request.getParameter("type") == null? "" :request.getParameter("type");
  11. if(moduleType.equals("")){
  12. list = XFormFactory.getXFormModel().getFormLists();
  13. }else{
  14. list = XFormFactory.getXFormModel().getFormListByType(moduleType);
  15. }
  16. int limited = list.size();
  17. if(list.size() > 1){
  18. limited --;
  19. }
  20. System.out.println(limited);
  21. %>
  22. <HTML>
  23. <HEAD>
  24. <TITLE></TITLE>
  25. <META http-equiv="Content-Type" content="text/html; charset=GB2312">
  26. <link rel="stylesheet" href="../../../styles/css.css" type="text/css">
  27. <script type="text/javascript" src="../../../scripts/ext20/adapter/ext/ext-base.js"></script>
  28. <script type="text/javascript" src="../../../scripts/ext20/ext-all.js"></script>
  29. <link rel="stylesheet" href="../../../scripts/ext20/resources/css/ext-all.css" type="text/css"></link>
  30. <script type="text/javascript">
  31. <%
  32. String refreshNode = request.getParameter("refreshNode") == null ? "" : request.getParameter("refreshNode");
  33. if(!refreshNode.equals("")){%>
  34. var loadTip = "<div>数据装载中,请稍候...</div>";
  35. var treeImagePath = "<%=request.getContextPath()%>/images/tree_images/";
  36. var url = "<%=request.getContextPath()%>/admin/menu/divTreeService.jsp?nodeID=pageList.<%=moduleType%>";
  37. var treeCloseImg = "plus.gif";
  38. var treeOpenImg = "minus.gif";
  39. parent.frames["confTreeFrame"].refreshNode('pageList.<%=moduleType%>');
  40. <%}%>
  41. </script>
  42. <SCRIPT LANGUAGE="JavaScript">
  43. Ext.onReady(function(){
  44. function toggleDetails(btn, pressed){
  45. var view = grid.getView();
  46. view.showPreview = pressed;
  47. view.refresh();
  48. }
  49. var ds= new Ext.data.Store({
  50. proxy: new Ext.data.ScriptTagProxy({url:'list_exc_Exc.jsp?type=<%=moduleType%>'}),
  51. reader: new Ext.data.JsonReader( {totalProperty:'totalProperty',root:'root'},
  52. [
  53. {name:'listid'},
  54. {name:'title'},
  55. {name:'refreshTime'},
  56. {name:'titleWidth'},
  57. {name:'type'},
  58. {name:'del'}
  59. ])
  60. });
  61. var cm=new Ext.grid.ColumnModel(
  62. [ new Ext.grid.RowNumberer(), /*cbsm,*/
  63. {header: '编号', dataIndex: 'listid', width: 50, sortable: true},
  64. {header: '列表标题', dataIndex: 'title', width: 150,sortable:true},
  65. {header: '刷新间隔', dataIndex: 'refreshTime'},
  66. {header: '列表所占宽度', dataIndex: 'titleWidth'},
  67. {header: '所属模块', dataIndex: 'type',sortable: true},
  68. {header: '删除', dataIndex: 'del'}
  69. ]
  70. );
  71. var grid=new Ext.grid.GridPanel({el:'BAG',ds:ds,cm:cm,/*sm:cbsm,*/
  72. width:700,
  73. height:500,
  74. title:'列表配置信息列表',
  75. store: ds
  76. });
  77. grid.render();
  78. ds.load({params:{start:1,limited:<%=limited%>}});
  79. }
  80. );
  81. </SCRIPT>
  82. </HEAD>
  83. <body>
  84. <div id="BAG"></div>
  85. </BODY>
  86. </HTML>