“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 ...
- 网站性能工具-YSlow的23个规则-网站性能优化
1. 减少HTTP请求次数 合并图片.CSS.JS,改进首次访问用户等待时间. 2. 使用CDN 就近缓存==>智能路由==>负载均衡==>WSA全站动态加速 3. 避免空的src和 ...
- TStream实现多表查询
TStream实现多表查询 function TynFiredac.QuerySQLS(const ASQL, ASQL2: string; AStorageFormat: string = 'bin ...
- 对ORM的支持 之 8.4 集成JPA ——跟我学spring3
8.4 集成JPA JPA全称为Java持久性API(Java Persistence API),JPA是Java EE 5标准之一,是一个ORM规范,由厂商来实现该规范,目前有Hibernate. ...
- ASIHTTPRequest系列(一):同步和异步请求
ASIHTTPRequest系列(一):同步和异步请求 发表于8个月前(2013-11-27 19:21) 阅读(431) | 评论(0) 6人收藏此文章, 我要收藏 赞0 ASIHTTPRequ ...
- 在Android工程中加入AIDL文件时,gen目录生成的文件报错-问题解决
from://http://blog.csdn.net/watt520/article/details/10099047 今天在弄清除缓存的东东,按照网上别人的方法,创建了一个AIDL文件,这个时候发 ...
- ibatis.net:第二天,Hello,World ?
背景 本文的内容全部来自于官方的文档,此处仅仅为了强化记忆. 项目结构 Properties.config <?xml version="1.0" encoding=&quo ...
- Unity中的内存泄漏
在对内存泄漏有一个基本印象之后,我们再来看一下在特定环境——Unity下的内存泄漏.大家都知道,游戏程序由代码和资源两部分组成,Unity下的内存泄漏也主要分为代码侧的泄漏和资源侧的泄漏,当然,资源侧 ...
- Tomcat集群下获取memcached缓存对象数量,统计在线用户数据量
项目需要统计在线用户数量,系统部署在集群环境下,使用会话粘贴的方式解决Session问题.要想得到真实在线用户数,必须是所有节点的总和. 这里考虑使用memcached存放用户登录数据,key为use ...
- Android之Android apk动态加载机制的研究
转载请注明出处:http://blog.csdn.net/singwhatiwanna/article/details/22597587 (来自singwhatiwanna的csdn博客) 背景 问题 ...