documentPower.jsp 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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. <link rel="stylesheet" href="<%=basePath %>resource/css/main.css" type="text/css"></link>
  14. <script type="text/javascript" src="<%=basePath %>resource/ext/ext-all.js"></script>
  15. <script type="text/javascript" src="<%=basePath %>resource/i18n/i18n.js"></script>
  16. <script type="text/javascript">
  17. var caller = "DocumentPower";
  18. Ext.Loader.setConfig({
  19. enabled: true
  20. });//开启动态加载
  21. Ext.Ajax.request({//拿到treegrid数据
  22. url : basePath + 'common/singleGridPanel.action',
  23. params: {
  24. caller: caller,
  25. condition: ''
  26. },
  27. callback : function(options,success,response){
  28. var res = new Ext.decode(response.responseText);
  29. if(res.columns){
  30. fields = res.fields;
  31. columns = res.columns;
  32. Ext.application({
  33. name: 'erp',//为应用程序起一个名字,相当于命名空间
  34. appFolder: basePath+'app',//app文件夹所在路径
  35. controllers: [//声明所用到的控制层
  36. 'ma.DocumentPower'
  37. ],
  38. launch: function() {
  39. Ext.create('erp.view.ma.DocumentPower');//创建视图
  40. }
  41. });
  42. } else if(res.exceptionInfo){
  43. showError(res.exceptionInfo);
  44. }
  45. }
  46. });
  47. </script>
  48. </head>
  49. <body >
  50. </body>
  51. </html>