pageCss.jsp 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <%@ page pageEncoding="UTF-8"%>
  2. <%@ page contentType="text/html; charset=UTF-8" language="java" %>
  3. <%@ page language="java"
  4. import="com.sysmodel.XFormModelImpl,
  5. java.util.Map,
  6. java.util.Iterator"%>
  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. <LINK rel="stylesheet" href="../../../styles/sortabletable.css" type="text/css">
  12. <script type="text/javascript" src="../../../scripts/ext20/adapter/ext/ext-base.js"></script>
  13. <link rel="stylesheet" href="../../../scripts/ext20/resources/css/ext-all.css" type="text/css"></link>
  14. <script type="text/javascript" src="../../../scripts/ext20/ext-all.js"></script>
  15. <script type="text/javascript">
  16. Ext.onReady(function(){
  17. Ext.state.Manager.setProvider(new Ext.state.CookieProvider());
  18. var myData = [
  19. <% Map pageCss =XFormModelImpl.getInstance().getPageCssMap();
  20. Iterator it = pageCss.entrySet().iterator();
  21. while (it.hasNext()) {
  22. Map.Entry entry = (Map.Entry) it.next();
  23. Object key = entry.getKey();
  24. Object value = entry.getValue();
  25. out.print("['"+key+"','"+value+"']");
  26. if (it.hasNext()) out.print(",\n");
  27. }%>
  28. ];
  29. var store = new Ext.data.SimpleStore({
  30. fields: [
  31. {name: 'code'},
  32. {name: 'value'}
  33. ]
  34. });
  35. store.loadData(myData);
  36. var grid = new Ext.grid.GridPanel({
  37. store: store,
  38. columns: [
  39. new Ext.grid.RowNumberer(),
  40. {header: "CSS名称", width: 100, sortable: true,dataIndex: 'code'},
  41. {header: "CSS对应的CLASS", width: 200, sortable: true,dataIndex: 'value'}
  42. ],
  43. stripeRows: true,
  44. height:500,
  45. width:750,
  46. title:'页面CSS配置'
  47. });
  48. grid.render('report');
  49. grid.getSelectionModel().selectFirstRow();
  50. });
  51. </script>
  52. </head>
  53. <body>
  54. <div id="report"></div>
  55. </body>
  56. </html>