Uncaught TypeError: Cannot call method 'createChild' of undefined

我在使用Ext 4.1.1做grid.Panel,然后chrome爆出这么个错误,无法理解,百度谷歌终于改好了

是这样子的,grid.Panel的整个代码要放到Ext.onReady里面,例如

  1. Ext.onReady(function(){
  2. searchProcess();
  3.  
  4. });

searchProcess()方法里面写了grid.Panel的全部代码。

贴一下吧,功能不全,呵呵

  1. Ext.Loader.setConfig({enabled:true});
  2. Ext.Loader.setPath('Ext.ux', basePath + 'javascript/extjs/ux');
  3. Ext.BLANK_IMAGE_URL=basePath + "images/s.gif";
  4. Ext.require([
  5. 'Ext.grid.*',
  6. 'Ext.data.*',
  7. 'Ext.util.*',
  8. 'Ext.state.*',
  9. 'Ext.ux.grid.FiltersFeature',
  10. 'Ext.toolbar.Paging',
  11. 'Ext.ux.ajax.JsonSimlet',
  12. 'Ext.ux.ajax.SimManager'
  13. ]);
  14.  
  15. Ext.define('processRejectDevice', {
  16. extend:'Ext.data.Model',
  17. fields:[
  18. { name:'id', type:'int', mapping:'id', convert:null, defaultValue:undefined},
  19. { name:'userId', type:'string', convert:null, defaultValue:undefined},
  20. { name:'finished', type:'string', convert:null, defaultValue:undefined},
  21. { name:'processType', type:'string', convert:null, defaultValue:undefined},
  22. { name:'destination', type:'string', convert:null, defaultValue:undefined},
  23. { name:'initDate', type:'string', convert:null, defaultValue:undefined},
  24. { name:'reason', type:'string', convert:null, defaultValue:undefined},
  25. { name:'title', type:'string', convert:null, defaultValue:undefined}
  26. ],
  27. idProperty:'id'
  28. });
  29. var searchProcess = function () {
  30.  
  31. Ext.QuickTips.init();
  32.  
  33. Ext.state.Manager.setProvider(Ext.create('Ext.state.CookieProvider'));
  34.  
  35. var store = Ext.create('Ext.data.Store', {
  36. model:'processRejectDevice',
  37. remoteSort:true,
  38. proxy:{
  39. //异步获取数据,这里的URL可以改为任何动态页面,只要返回JSON数据即可
  40. type:'ajax',
  41. url:'./processSecFile_getProcessByFileid4Ajax.action',
  42. reader:{
  43. root:'items',
  44. totalProperty:'total'
  45. }
  46. },
  47. pageSize:20
  48. });
  49.  
  50. store.on('beforeload', function (store, options) {
  51. var new_params = {fileid:fileId};
  52. Ext.apply(store.proxy.extraParams, new_params);
  53. });
  54.  
  55. //分页组件
  56. var pagingToolbar = new Ext.PagingToolbar({
  57. emptyMsg:"没有数据",
  58. displayInfo:true,
  59. displayMsg:"显示从{0}条数据到{1}条数据,共{2}条数据",
  60. store:store
  61. });
  62.  
  63. var sm = Ext.create('Ext.selection.CheckboxModel');
  64.  
  65. var grid = Ext.create('Ext.grid.Panel', {
  66. store:store,
  67. stateful:true,
  68. //collapsible: true,
  69. multiSelect:true,
  70.  
  71. stateId:'stateGrid',
  72. bbar:pagingToolbar,
  73. selModel:sm,
  74. columns:[
  75. {dataIndex:'id', text:'流程id', width:30, filterable:true, sortable:true },
  76. {dataIndex:'userId', text:'用id', width:100, filterable:true, sortable:true },
  77. {dataIndex:'finished', text:'是否', width:100, sortable:true, filterable:true},
  78. {dataIndex:'processType', text:'流程类型', width:50, sortable:true, filterable:true},
  79. {dataIndex:'destination', text:'destination', width:50, sortable:true, filterable:true},
  80. {dataIndex:'initDate', text:'发起日期', width:50, sortable:true, filterable:true},
  81. {dataIndex:'reason', text:'发起原因', width:100, sortable:true, filterable:true},
  82. {dataIndex:'title', text:'标题', width:50, sortable:true, filterable:true}
  83. ],
  84. height:400,
  85. bodyStyle:'width:100%',
  86. renderTo:Ext.getBody(),
  87. forceFit:true,
  88. viewConfig:{
  89. stripeRows:true,
  90. enableTextSelection:true
  91. }
  92. });
  93. store.loadPage(1);
  94. }

以上!

“Uncaught TypeError: Cannot call method 'createChild' of undefined" 问题的解决的更多相关文章

  1. JsBridge "Uncaught TypeError: Cannot call method 'callHandler' of undefined", source

    h5和原生结合开发app越来越流行.其实就是webview 的js调用native的方法.也就是需要搭建一个桥.这样的桥早就有人搭建好了,那就是jsbridge. git地址: https://git ...

  2. 显示 Uncaught TypeError: Cannot read property 'dialog' of undefined”的错误解决方法

    最近在做一个基于easyUI的列表,新增功能的弹出框是以这样的方式: 运行测试的时候,报了这一堆的错误Uncaught TypeError: Cannot read property 'dialog' ...

  3. bootstrap datepicker Uncaught TypeError: Cannot call method 'split' of undefined问题

    这个问题主要是由于date对象不是字符串,不能使用 split 函数,简单处理一下,转换成字符串就可以解决问题: ++++++++++++++++++++++++ parseDate: functio ...

  4. SignalR代理对象异常:Uncaught TypeError: Cannot read property 'client' of undefined 推出的结论 SignalR 简单示例 通过三个DEMO学会SignalR的三种实现方式 SignalR推送框架两个项目永久连接通讯使用 SignalR 集线器简单实例2 用SignalR创建实时永久长连接异步网络应用程序

    SignalR代理对象异常:Uncaught TypeError: Cannot read property 'client' of undefined 推出的结论   异常汇总:http://www ...

  5. Uncaught TypeError: Cannot read property 'msie' of undefined

    因为图方便,抄了别人写的一个jquerry插件,运行时“var pos = ($.browser.msie && parseInt($.browser.version) <= 6 ...

  6. easyui使用时出现这个Uncaught TypeError: Cannot read property 'combo' of undefined

    easyui使用时出现这个Uncaught TypeError: Cannot read property 'nodeName' of undefined 最后检查发现是必须给select一个id,光 ...

  7. reactjs Uncaught TypeError: Cannot read property 'location' of undefined

    reactjs Uncaught TypeError: Cannot read property 'location' of undefined reactjs 路由配置 怎么跳转 不成功 国内搜索引 ...

  8. index.js:13 Uncaught TypeError: Cannot read property 'split' of undefined

    使用 webpack 编译 Vue 项目时出现报错: index.js:13 Uncaught TypeError: Cannot read property 'split' of undefined ...

  9. Uncaught TypeError: Cannot read property ‘split’ of undefined

    问题 :Uncaught TypeError: Cannot read property ‘split’ of undefinedat HTMLLIElement. split()切割的问题 因为遍历 ...

随机推荐

  1. USBDM Coldfire V2,3,4/DSC/Kinetis Debugger and Programmer -- MC9S08JS16

    Introduction The attached files provide a port of a combined TBLCF/DSC code to a MC9S08JS16 processo ...

  2. Dapper-translation 分布式监控系统

    http://bigbully.github.io/Dapper-translation/ https://github.com/bigbully/Dapper-translation

  3. 在ASP.NET MVC实现购物车,尝试一种不同于平常的购物车显示方式

    通常,我们看到的购物车是这样的: 虽然这种购物车显示方式被广泛运用,但我个人觉得不够直观.如果换成这样呢? 本篇的源码放在了:https://github.com/darrenji/ShoppingC ...

  4. Windows Phone本地数据库(SQLCE):14、删除数据(翻译)

    这是“windows phone mango本地数据库(sqlce)”系列短片文章的最后一篇第十四篇. 为了让你开始在Windows Phone Mango中使用数据库,这一系列短片文章将覆盖所有你需 ...

  5. 转: Linux --- Supervisor的作用与配置

    supervisor管理进程,是通过fork/exec的方式将这些被管理的进程当作supervisor的子进程来启动,所以我们只需要将要管理进程的可执行文件的路径添加到supervisor的配置文件中 ...

  6. http链接的性能测试工具httping

    安装:MAC环境下使用brew进行安装      brew  install  httping 使用参数: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 ...

  7. SRE学习笔记:分布式共识系统、Paxos协议

    最近阅读了<SRE Google运维解密>的第23章,有一些感触,记录一下. 日常工作中,我们经常需要一些服务分布式的运行.跨区域如跨城.跨洲部署运行分布式系统往往是容易的,但是如何保证各 ...

  8. Java 8函数式接口functional interface的秘密

    Java 8函数式接口functional interface的秘密 2014年10月29日 17:52:55 西瓜可乐520 阅读数:3729   目录 [−] JDK 8之前已有的函数式接口 新定 ...

  9. 标准输出中stderr和stdout的区别

    一.首先介绍一下三者printf,sprintf,fprintf的功能 1,printf就是标准输出,在屏幕上打印出一段字符串来. 2,sprintf就是把格式化的数据写入到某个字符串中.返回值字符串 ...

  10. 以双斜杠//开头的URL的含义

    在HTML网页中,有时会发现类似于//www.studyofnet.com/news/1341.html这样的代码,那么,这种以双斜杠//开头的URL的含义是什么呢? 在WEB网页中,有时会发现类似下 ...