更换Ext.viewport各个方位下的显示内容

更换Ext.viewport各个方位上的显示内容更换Ext.viewport各个方位上的显示内容定义replace方法var replace

更换Ext.viewport各个方位上的显示内容

更换Ext.viewport各个方位上的显示内容

定义replace方法

    var replace = function(id, config){    var comp = Ext.getCmp(id);    comp.remove(0);    comp.add(config);    comp.doLayout();    }

?方法说明:id是viewport各方位的id,config是即将显示在viewport上的内容

?

?在viewport的center方位更换一个EditorGrid

handler:function(){       editGrid = newBankCxGrid();       replace('cmp_center',editGrid);}

?在方法newBankCxGrid创建并返回editGrid。