读书人

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

发布时间: 2012-10-24 14:15:58 作者: rapoo

更换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。

读书人网 >Web前端

热点推荐