Uncaught TypeError: Cannot call method 'createChild' of undefined

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

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

Ext.onReady(function(){
searchProcess(); });

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

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

Ext.Loader.setConfig({enabled:true});
Ext.Loader.setPath('Ext.ux', basePath + 'javascript/extjs/ux');
Ext.BLANK_IMAGE_URL=basePath + "images/s.gif";
Ext.require([
'Ext.grid.*',
'Ext.data.*',
'Ext.util.*',
'Ext.state.*',
'Ext.ux.grid.FiltersFeature',
'Ext.toolbar.Paging',
'Ext.ux.ajax.JsonSimlet',
'Ext.ux.ajax.SimManager'
]); Ext.define('processRejectDevice', {
extend:'Ext.data.Model',
fields:[
{ name:'id', type:'int', mapping:'id', convert:null, defaultValue:undefined},
{ name:'userId', type:'string', convert:null, defaultValue:undefined},
{ name:'finished', type:'string', convert:null, defaultValue:undefined},
{ name:'processType', type:'string', convert:null, defaultValue:undefined},
{ name:'destination', type:'string', convert:null, defaultValue:undefined},
{ name:'initDate', type:'string', convert:null, defaultValue:undefined},
{ name:'reason', type:'string', convert:null, defaultValue:undefined},
{ name:'title', type:'string', convert:null, defaultValue:undefined}
],
idProperty:'id'
});
var searchProcess = function () { Ext.QuickTips.init(); Ext.state.Manager.setProvider(Ext.create('Ext.state.CookieProvider')); var store = Ext.create('Ext.data.Store', {
model:'processRejectDevice',
remoteSort:true,
proxy:{
//异步获取数据,这里的URL可以改为任何动态页面,只要返回JSON数据即可
type:'ajax',
url:'./processSecFile_getProcessByFileid4Ajax.action',
reader:{
root:'items',
totalProperty:'total'
}
},
pageSize:20
}); store.on('beforeload', function (store, options) {
var new_params = {fileid:fileId};
Ext.apply(store.proxy.extraParams, new_params);
}); //分页组件
var pagingToolbar = new Ext.PagingToolbar({
emptyMsg:"没有数据",
displayInfo:true,
displayMsg:"显示从{0}条数据到{1}条数据,共{2}条数据",
store:store
}); var sm = Ext.create('Ext.selection.CheckboxModel'); var grid = Ext.create('Ext.grid.Panel', {
store:store,
stateful:true,
//collapsible: true,
multiSelect:true, stateId:'stateGrid',
bbar:pagingToolbar,
selModel:sm,
columns:[
{dataIndex:'id', text:'流程id', width:30, filterable:true, sortable:true },
{dataIndex:'userId', text:'用id', width:100, filterable:true, sortable:true },
{dataIndex:'finished', text:'是否', width:100, sortable:true, filterable:true},
{dataIndex:'processType', text:'流程类型', width:50, sortable:true, filterable:true},
{dataIndex:'destination', text:'destination', width:50, sortable:true, filterable:true},
{dataIndex:'initDate', text:'发起日期', width:50, sortable:true, filterable:true},
{dataIndex:'reason', text:'发起原因', width:100, sortable:true, filterable:true},
{dataIndex:'title', text:'标题', width:50, sortable:true, filterable:true}
],
height:400,
bodyStyle:'width:100%',
renderTo:Ext.getBody(),
forceFit:true,
viewConfig:{
stripeRows:true,
enableTextSelection:true
}
});
store.loadPage(1);
}

以上!

“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. 在ASP.NET MVC中使用Knockout实践05,基本验证

    本篇体验View Model验证.Knockout的subscribe方法能为View Model成员注册验证规则. @{ ViewBag.Title = "Index"; Lay ...

  2. 在arcgis使用python脚本进行字段计算时是如何解决中文问题的

    来自:https://www.jb51.net/article/73561.htm 一.引言 在arcgis打开一个图层的属性表,可以对属性表的某个字段进行计算,但是在平常一般都是使用arcgis提供 ...

  3. 安装GCC-4.6.1详细教程

    一.什么是Gcc Linux系统下的Gcc(GNU C Compiler)是GNU推出的功能强大.性能优越的多平台编译器,是GNU的代表作品之一.gcc是可以在多种硬体平台上编译出可执行程序的超级编译 ...

  4. 查看Android源码版本

    from://http://www.cnblogs.com/flyme/archive/2011/10/14/2211143.html 有时候我们辛苦取到Android的源代码,想知道它的确切版本号, ...

  5. Caused by: java.lang.IllegalArgumentException: Can not set int field reyo.sdk.enity.xxx.xxx to java.lang.Long

    由于数据库字段设置不正确引起的,不能选中 alter <table> modify <column> int unsigned; 关于unsigned int类型,可以看看它的 ...

  6. git合并的时候,冲突问题Merging is not possible because you have unmerged files

    在做项目工作的时候,同事修改了代码一个cpp代码,我同样也修改了代码,两人代码冲突了,提交之后,他代码git自动合并,并提示: [master| MERGEING]$ git merge my_new ...

  7. Javascript与Objective-C 字符串与数组的方法类比

    table {border-collapse:collapse;} table td {border:1px solid #ccc;} String vs NSString JavaScript st ...

  8. C++MFC编程笔记day05 文档类-单文档和多文档应用程序

    文档类 1 相关类    CDocument类-父类是CCmdTarget类,所以,文档类也能够处理菜单等               命令消息. 作用保存和管理数据.    注意事项:怎样解决断言错 ...

  9. TextView中文文档

    十分感谢农民伯伯的翻译:http://www.cnblogs.com/over140/archive/2010/08/27/1809745.html xml 属性: 属性名称 描述  android: ...

  10. [Web 前端] CSS篇之2. 清除浮动,什么时候需要清除浮动,清除浮动都有哪些方法

    cp: https://blog.csdn.net/zengyonglan/article/details/53304487 2. 清除浮动,什么时候需要清除浮动,清除浮动都有哪些方法 ? 一.什么时 ...