PDA

View Full Version : LazyRenderToolBarPlugin



zhansheng
11 Jul 2008, 2:16 AM
//config in lazy rendered grid... ..

{

xtype:'grid',

plugins:new LazyRenderToolBarPlugin (),

bbar:{

//paging bar config,we needn't to build a PagingToolBar component here
}

...

other config...

}



plugin code :


LazyRenderToolBarPlugin = function() {

this.init = function(panel) {

var bottomToolbar = panel.bottomToolbar;
if (bottomToolbar) {
if (!bottomToolbar instanceof Ext.Toolbar) {

panel.bottomToolbar = Ext.ComponentMgr.create(bottomToolbar,
'toolbar');

}

}

}

}