就是只要关闭了分组,右边的显示就无法对应点击当前的了。。高手求解
var gridForm = Ext.create('Ext.form.Panel', { id: 'dict-form', frame: true, title: '字典管理', bodyPadding: 5, width: 'auto', //height: 'auto', layout: 'column', // Specifies that the items will now be arranged in columns fieldDefaults: { labelAlign: 'left', msgTarget: 'side' }, items: [{ columnWidth: 0.60, xtype: 'gridpanel', store: ds, height: 400, title: '字典列表', //buttonAlign : 'left', //collapsible: true, // features: [groupingFeature], features: [{ ftype: 'grouping',// 表格分组:Ext.grid.feature.Grouping id: 'group',// 组件id Ext.Cmp('viewId').view.getFeature('id') enableGroupingMenu: false, groupHeaderTpl: '字典分组: {name} ({rows.length} Item{[values.rows.length > 1 ? "s" : ""]})' }], columns: [ { text: '字典显示值', //width : 75, flex: 0.4, sortable: false, dataIndex: 'dict_display' }, { text: '字典提交值', //width : 75, //sortable : true, flex: 0.3, dataIndex: 'dict_value' }, { text: '分组标识', //width : 75, //sortable : true, flex: 0.3, //renderer : change, dataIndex: 'dict_group' }, ], // buttons : [{ // text:'新增', // handler : function(){ // groupingFeature.disable(); // } // }], listeners: { select: function(dataview,record,index) {//record被选中时产生的事件 this.up('form').getForm().loadRecord(record) }, }, { columnWidth: 0.4, margin: '0 0 0 10', xtype: 'fieldset', title: '菜单修改', defaults: { width: 240, labelWidth: 90 }, defaultType: 'textfield', items: [{ fieldLabel: '字典显示值', name: 'dict_display' }, { fieldLabel: '字典提交值', name: 'dict_value' }, { fieldLabel: '分组标识', name: 'dict_group' }, { xtype: 'hidden', name: 'dict_id' }, { xtype: 'fieldcontainer', layout: 'hbox', items: [ { xtype: 'button', flex: 1, text: '保存', handler: function () { var changeClew; if (gridForm.getForm().findField('dict_id').getValue()) { changeClew = '确认保存修改后的数据吗?' } else { changeClew = '确认新增这条记录吗?' } Ext.Msg.confirm('是否提交?', changeClew, function (e) { if (e == 'yes') { Ext.Ajax.request({ url: contextPath + '/form/addDict', method: 'post', defaultHeaders: { Accept: "application/json" }, params: gridForm.getForm().getValues(), success: function (response) { //alert(response.responseText); if (response.responseText == 'success') { gridForm.child('gridpanel').store.load(); gridForm.getForm().reset(); } //var o = Ext.JSON.decode(response.responseText); //alert(o.menuName); }, failure: function () { } }); } }); } }, { xtype: 'button', flex: 1, text: '重置', handler: function () { //Ext.Msg.alert('Status', 'Changes saved successfully.'); gridForm.getForm().reset(); } }, { xtype: 'button', flex: 1, text: '刷新缓存', handler: function () { Ext.Msg.confirm('是否提交?', '是否立刻刷新字典缓存?', function (e) { if (e == 'yes') { Ext.Ajax.request({ url: contextPath + '/form/refreshDict', method: 'post', defaultHeaders: { Accept: "application/json" }, success: function (response) { //alert(response.responseText); if (response.responseText == 'success') { Ext.Msg.alert('刷新结果', '缓存刷新成功'); } //var o = Ext.JSON.decode(response.responseText); //alert(o.menuName); }, failure: function () { } }); } }); } } ] }] }],