我在extjs4工作。我有可折叠的面板=
xtype: 'panel',
autoHeight : true,
border: false,
itemId : 'dashmetrics',
frame: false,
cls : 'matrix-tab-panel-container',
bodyCls : 'matrix-tab-panel-container-body',
layout: 'form',
title : 'Panel1'
collapsible : true,
titleCollapse : true,
padding:'3px 0 3px 0',
stateful: true,
getState: function() {
return {
collapsed: this.collapsed
};
},
applyState : function(state){
if(state){
Ext.apply(this, state);
}
},
stateEvents: ['collapse', 'expand']
我想维持这种扩张和崩溃的状态。我尝试过如上所述,但是getState()总是返回false。那么如何在extjs4中维持面板的崩溃和扩展状态呢?