region:
This region's layout position (north, south, east, west or center). Read-only.
collapsible:true 收缩/展开
floatable:false 是否允许浮动
删除window中的item,下标无效中
var items = win.items;
win.remove(items.last());
选择行,getSelected()无效中
var selModel = grid.getSelectionModel();
if (selModel.hasSelection()) {
rs = selModel.getLastSelected();
Ext.Msg.alert("提示", rs.get('RoleID'));
获取表的store,使用store的ID无效
var store = Ext.getCmp('RoleAcc_operatePanel_Table').store;
设置不允许为空的文本框
allowBlank:false,
多项不能为空
function setDiyTextField(){ Ext.ComponentMgr.all.each(function(cmp){ var Type=cmp.getXType(); if(Type=='textfield'||Type=='fileuploadfield'||Type=='combo'||Type=='treecombo'||Type=='datefield'||Type=='numberfield'||Type=='textarea'||Type=='timefield'||Type=='trigger'){ if(cmp.allowBlank==false){ cmp.cls="Diy-text"; cmp.blankText="该输入项不能为空!"; } } }); }
执行等待提示
Ext.MessageBox.show({ title: '请稍等', msg: '正在提交数据...', progressText: '', 300, progress: true, closable: false, animEl: 'loding' }); Ext.MessageBox.hide();
复选框自动赋值方法(一)
{ xtype: 'checkcolumn', flex: 1, text: '选中', stopSelection: false, renderer: function (val, m, rec) { var flag = rec.get('id').split('_'); if (flag[1]=='true') return (new Ext.grid.column.CheckColumn).renderer(true); else { return (new Ext.grid.column.CheckColumn).renderer(false); } } }
复选框自动赋值方法(二)
后台的json:
string str = "[{text:'总公司1',id:'123',check:false,children:[{text:'部门1',id:'234',leaf:true,check:true}]},{text:'总公司2',id:'258',leaf:true,check:false}]";
字符串中的check的值不能加单引号,否则到了前台就是字符串,永远为true
前台:
Ext.define('Post', { extend: 'Ext.data.Model', fields: [{ name: "text", convert: undefined }, { name: "id", convert: undefined }, { name: "check", convert: undefined }] }); //树中的checkcolumn行
{ text: 'checkcolumn', xtype: 'checkcolumn', flex: 1, dataIndex: 'check', stopSelection: false, }
过滤器
proAppStore.filterBy(function(record) { return record.get('orgNameApp') == "IT"; });