8374181c1566ce01525a5ac9be6d9af962f331c5.svn-base 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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.XFormModelImpl,
  6. com.sysmodel.xformmodel.impl.*"%>
  7. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  8. <html>
  9. <head>
  10. <META http-equiv="Content-Type" content="text/html; charset=GB2312">
  11. <script type="text/javascript" src="../../../scripts/ext20/adapter/ext/ext-base.js"></script>
  12. <link rel="stylesheet" href="../../../scripts/ext20/resources/css/ext-all.css" type="text/css"></link>
  13. <script type="text/javascript" src="../../../scripts/ext20/ext-all.js"></script>
  14. <script type="text/javascript">
  15. Ext.onReady(function(){
  16. Ext.state.Manager.setProvider(new Ext.state.CookieProvider());
  17. var myData = [
  18. <%
  19. ArrayList JsFunctions=XFormModelImpl.getInstance().getJsFunctions();
  20. for(int j = 0; j < JsFunctions.size(); j++){
  21. JsFunctionImpl JsFunctionImpl=(JsFunctionImpl)JsFunctions.get(j);
  22. String code= JsFunctionImpl.getCode();
  23. String name= JsFunctionImpl.getName();
  24. String value=JsFunctionImpl.getValue();
  25. String Description=JsFunctionImpl.getDescription();
  26. out.print("['"+code+"','"+value+"','"+name+"','"+Description+"']");
  27. if (j != JsFunctions.size() - 1) out.print(",\n");
  28. }
  29. %>
  30. ];
  31. var store = new Ext.data.SimpleStore({
  32. fields: [
  33. {name: 'code', type: 'int'},
  34. {name: 'value'},
  35. {name: 'name'},
  36. {name: 'description'}
  37. ]
  38. });
  39. store.loadData(myData);
  40. var grid = new Ext.grid.GridPanel({
  41. store: store,
  42. columns: [new Ext.grid.RowNumberer(),
  43. {header: "编号", width: 75, sortable: true,dataIndex: 'code'},
  44. {header: "对应的value", width: 75, sortable: true,dataIndex: 'value'},
  45. {header: "名称", width: 75, sortable: true,dataIndex: 'name'},
  46. {header: "描述", width: 85, sortable: true,dataIndex: 'description'}
  47. ],
  48. stripeRows: true,
  49. height:500,
  50. width:750,
  51. title:'页面中通用JS函数配置'
  52. });
  53. grid.render('report');
  54. grid.getSelectionModel().selectFirstRow();
  55. });
  56. </script>
  57. </head>
  58. <body>
  59. <div id="report"></div>
  60. </body>
  61. </html>