tasktemplate.jsp 1.8 KB

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