我扩展了Ext.form.FormPanel。它包含有按钮的first panel和按一下按钮呈现的second panel。就像在照片上:

但是,second panel's项--它是变量--我在创建时给出了扩展的FormPanel,如下所示:
var store = new Ext.data.JsonStore({...});]
sote.load({params:{....}});
var grid = new Ext.grid.GridPanel({
//**config**//
store:store
});
var usersPanel = new myapp.StandartForm({
//**some config**//
secondPanelItems:[grid,{field1},{filed2...}]
});因此,当我创建扩展的grid时,FormPanel只创建了一次。当第二个面板显示时,我如何创建它?
发布于 2013-10-17 07:53:39
使用xtype。因此,每次实例化网格时都会创建网格(编辑:将存储添加为xtype)
var usersPanel = new myapp.StandartForm({
//**some config**//
secondPanelItems:[{
xtype: 'grid',
//**grid config**//
store: {
xtype: 'jsonstore',
autoLoad: true,
// other store attr
baseParams: {...}
}
},{field1},{filed2...}]
});https://stackoverflow.com/questions/19420974
复制相似问题