“Uncaught TypeError: Cannot call method 'createChild' of undefined" 问题的解决
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" 问题的解决的更多相关文章
- JsBridge "Uncaught TypeError: Cannot call method 'callHandler' of undefined", source
h5和原生结合开发app越来越流行.其实就是webview 的js调用native的方法.也就是需要搭建一个桥.这样的桥早就有人搭建好了,那就是jsbridge. git地址: https://git ...
- 显示 Uncaught TypeError: Cannot read property 'dialog' of undefined”的错误解决方法
最近在做一个基于easyUI的列表,新增功能的弹出框是以这样的方式: 运行测试的时候,报了这一堆的错误Uncaught TypeError: Cannot read property 'dialog' ...
- bootstrap datepicker Uncaught TypeError: Cannot call method 'split' of undefined问题
这个问题主要是由于date对象不是字符串,不能使用 split 函数,简单处理一下,转换成字符串就可以解决问题: ++++++++++++++++++++++++ parseDate: functio ...
- 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 ...
- Uncaught TypeError: Cannot read property 'msie' of undefined
因为图方便,抄了别人写的一个jquerry插件,运行时“var pos = ($.browser.msie && parseInt($.browser.version) <= 6 ...
- easyui使用时出现这个Uncaught TypeError: Cannot read property 'combo' of undefined
easyui使用时出现这个Uncaught TypeError: Cannot read property 'nodeName' of undefined 最后检查发现是必须给select一个id,光 ...
- reactjs Uncaught TypeError: Cannot read property 'location' of undefined
reactjs Uncaught TypeError: Cannot read property 'location' of undefined reactjs 路由配置 怎么跳转 不成功 国内搜索引 ...
- index.js:13 Uncaught TypeError: Cannot read property 'split' of undefined
使用 webpack 编译 Vue 项目时出现报错: index.js:13 Uncaught TypeError: Cannot read property 'split' of undefined ...
- Uncaught TypeError: Cannot read property ‘split’ of undefined
问题 :Uncaught TypeError: Cannot read property ‘split’ of undefinedat HTMLLIElement. split()切割的问题 因为遍历 ...
随机推荐
- LightOJ 1074 - Extended Traffic (SPFA)
http://lightoj.com/volume_showproblem.php?problem=1074 1074 - Extended Traffic PDF (English) Stati ...
- The STM32 SPI and FPGA communication
The STM32 SPI and FPGA communication STM32 spi bus communication SPI bus in the study, the protocol ...
- OAuth2.0网页授权 提示未关注该测试号
用无高级接口权限的公众号使用别人的appid和appsecret在网页中获取用户信息时,提示未关注该测试号. 搜集各种资料才发现是因为 测试帐号只能对关注者网页授权,正式帐号可以对未关注者授权
- effective C++ 读书笔记 条款08
条款08 别让异常逃离析构函数: 假设在析构函数其中发生了异常,程序可能会过早结束或者导致不明白行为(异常从析构函数传播出去) 看代码: #include <iostream> usin ...
- 用C扩展Python2
参考 python扩展实现方法--python与c混和编程 编写Python扩展(Extending Python with C or C++) https://docs.python.org/2.7 ...
- ASP.NET Web API中实现版本的几种方式
在ASP.NET Web API中,当我们的API发生改变,就涉及到版本问题了.如何实现API的版本呢? 1.通过路由设置版本 最简单的一种方式是通过路由设置,不同的路由,不同的版本,不同的contr ...
- 发布网站时应该把debug设置false
在ASP.NET项目根目录下的Web.config中有这样的一个节点: <compilation debug="true" targetFramework="4.5 ...
- springboot线程池的使用和扩展(转)
springboot线程池的使用和扩展 我们常用ThreadPoolExecutor提供的线程池服务,springboot框架提供了@Async注解,帮助我们更方便的将业务逻辑提交到线程池中异步执行, ...
- ASIHttpRequest release 包无法发出请求
ASIHttpRequest 在 Release 模式下,Optimize 后会导致发不出请求. 解决方案: 去掉这两个文件的 Optimization:ASIFormDataRequest.m AS ...
- 【转】IntelliJ IDEA关联SVN
http://blog.csdn.net/xdd19910505/article/details/52756417 问题描述: IntelliJ IDEA安装之后,使用SVN进行提交或更新以及检出代码 ...