0
我的樹面板在刪除和添加它後不渲染。ExtJS 4.我的樹面板不渲染
這是我grid panel
的'selection change'
處理程序:
selectionChange : function(selmodel, selection, eOpts) {
var selected = selection.length > 0;
if (selected) {
var view = Ext.getCmp('viewportCenterId');
view.removeAll();
if (selection[0].get('id') == '1') {
view.add({
xtype:'publicationTree'
});
} else if (selection[0].get('id') == '0') {
view.add({
xtype: 'userinfoform'
});
}
}
}
publicationTree
是我tree panel
,並沒有渲染後。
當我想把這個tree panel
的區域第一次加載時,此代碼正在工作。 (我通過xtype將代碼放在我的樹面板中)。
{
region: 'center',
id: 'viewportCenterId',
collapsible: false,
width: '60%',
border: true,
items:{
xtype:'publicationTree',
width: '100%',
height: '100%'
}
}
我已經試過它,不幫:( –