category.jsp 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <%@ page language="java" contentType="text/html; charset=utf-8"
  2. pageEncoding="utf-8"%>
  3. <%
  4. request.setCharacterEncoding("utf-8");
  5. String path = request.getContextPath();
  6. String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
  7. %>
  8. <!DOCTYPE html>
  9. <html>
  10. <head>
  11. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  12. <link rel="stylesheet" href="<%=basePath %>resource/ext/resources/css/ext-all-gray.css" type="text/css"></link>
  13. <!--[if IE]>
  14. <link rel="stylesheet" href="<%=basePath %>resource/ext/resources/css/ext-ie-scoped.css" type="text/css"></link>
  15. <![endif]-->
  16. <link rel="stylesheet" href="<%=basePath %>resource/css/main.css" type="text/css"></link>
  17. <script type="text/javascript" src="<%=basePath %>resource/ext/ext-all.js"></script>
  18. <script type="text/javascript" src="<%=basePath %>resource/i18n/i18n.js"></script>
  19. <script type="text/javascript">
  20. var caller = "Category";
  21. Ext.Loader.setConfig({
  22. enabled: true
  23. });//开启动态加载
  24. Ext.Ajax.request({//拿到treegrid数据
  25. url : basePath + 'common/singleGridPanel.action',
  26. params: {
  27. caller: caller,
  28. condition: ''
  29. },
  30. callback : function(options,success,response){
  31. var res = new Ext.decode(response.responseText);
  32. if(res.columns){
  33. fields = res.fields;
  34. columns = res.columns;
  35. Ext.application({
  36. name: 'erp',//为应用程序起一个名字,相当于命名空间
  37. appFolder: '<%=basePath %>'+'app',//app文件夹所在路径
  38. controllers: [//声明所用到的控制层
  39. 'fa.gla.Category'
  40. ],
  41. launch: function() {
  42. Ext.create('erp.view.fa.gla.Category');//创建视图
  43. }
  44. });
  45. } else if(res.exceptionInfo){
  46. showError(res.exceptionInfo);
  47. }
  48. }
  49. });
  50. </script>
  51. </head>
  52. <body >
  53. </body>
  54. </html>