regExps.jsp 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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. <% ArrayList regExps=XFormModelImpl.getInstance().getRegExps();
  19. for(int j = 0; j<regExps.size(); j++){
  20. RegExpImpl RegExpImpl=(RegExpImpl)regExps.get(j);
  21. String code= RegExpImpl.getCode();
  22. String name= RegExpImpl.getName();
  23. String value=RegExpImpl.getValue();
  24. String Description=RegExpImpl.getDescription();
  25. out.print("['"+code+"','"+value+"','"+name+"','"+Description+"']");
  26. if (j != regExps.size() - 1) out.print(",\n");
  27. }%>
  28. ];
  29. var store = new Ext.data.SimpleStore({
  30. fields: [
  31. {name: 'code', type: 'int'},
  32. {name: 'value'},
  33. {name: 'name'},
  34. {name: 'description'}
  35. ]
  36. });
  37. store.loadData(myData);
  38. var grid = new Ext.grid.GridPanel({
  39. store: store,
  40. columns: [new Ext.grid.RowNumberer(),
  41. {header: "编号", width: 75, sortable: true,dataIndex: 'code'},
  42. {header: "对应的value", width: 75, sortable: true,dataIndex: 'value'},
  43. {header: "名称", width: 75, sortable: true,dataIndex: 'name'},
  44. {header: "描述", width: 85, sortable: true,dataIndex: 'description'}
  45. ],
  46. stripeRows: true,
  47. height:500,
  48. width:750,
  49. title:'页面中政则表达式配置'
  50. });
  51. grid.render('report');
  52. grid.getSelectionModel().selectFirstRow();
  53. });
  54. </script>
  55. </head>
  56. <body>
  57. <div id="report"></div>
  58. </body>
  59. </html>