随笔分类 - ExtJS4
摘要:项目目录结构如下:(1)index.html 用户管理 (2)app.jsExt.Loader.setConfig({enabled:true}); Ext.a...
阅读全文
摘要:提示:Uncaught Ext.Loader is not enabled, so dependencies cannot be resolved dynamically. Missing required class: AM.controller.Users提示该错误的原因是因为Ext默认是不开启...
阅读全文
摘要:要想让 tooltip生效必须:Ext.QuickTips.init();
阅读全文
摘要:Ext.onReady(function() { var mPanel = Ext.create('Ext.panel.Panel', { title: 'Panel', width: '100%', height: 100, rende...
阅读全文
摘要:将Window的属性closeAction设置为hide就可以了。var panel1 = Ext.create('Ext.panel.Panel', { title: 'this is panel 1', width: 100, height: 60});var panel2 =...
阅读全文
摘要:convert: function(value,record){}value:为当前属性的值,record.get('属性')用来获取其他属性的值。以下案例是:将年龄减去2。Ext.define('MyModel', { extend: 'Ext.data.Model', fields:...
阅读全文
摘要:Ext.getCmp(Ext组件ID),根据Ext组件的ID选择EXT组件。例如:点击Panel->toolbar上的button改变Panel的标题Ext.onReady(function(){ Ext.create('Ext.panel.Panel', { id: 'myPa...
阅读全文
摘要:原先照着Extjs4.0.7官方文档写了一个GridPanel的列子,没有什么问题,今天又自己写了一个,效果如下,内容肯定拿到就是不显示:经过一段代码排查后,问题出在了自定义Model时将fields误写成field,经改正后问题解决。/*============Model==========*/Ext.define('Wpush', { extend: 'Ext.data.Model', fields: ['nsrsbh', 'title', 'tssj', 'tsflag']});
阅读全文
摘要:uncaught exception: Ext.Loader is not enabled, so dependencies cannot be resolved dynamically. Missing required class: AM.controller.User解决方法:在app.js最上面加上:Ext.Loader.setConfig({ enabled: true });Ext.Loader.setConfig({ enabled: true });Ext.application({ name: 'AM', appFolder: 'app', .
阅读全文
摘要:代码如下:Ext.onReady(function(){ //定义列 var cm = new Ext.grid.ColumnModel([ {header: '编号', dataIndex: 'id'}, {header: '名称', dataIndex: 'name'}, {header: '描述', dataIndex: 'des'} ]); ...
阅读全文