PDA

View Full Version : PagingToolbar as a ContentPanel toolbar 2



ciduarte
19 Apr 2007, 7:12 PM
Well I have been working with the code...

I try this
where ds is a Ext.Store.dataset previously created


var pag = new Ext.PagingToolbar('paging',ds,{
pageSize: 1,
displayInfo: false,
displayMsg: 'Displaying topics {0} - {1} of {2}',
emptyMsg: "No topics to display"}
);


Then I try to added it to a Content Panel as a toolbar like this


layout.add('center', new Ext.ContentPanel('center1', {title: 'Citas', closable: false,toolbar:pag}));


but the layout just become a mess...

I decide to try with a nested layout



innerLayout.add('south',new Ext.ContentPanel('paging', {title: 'Feed Articles',toolbar:pag}));


And actually works... but I think I'm not doing it in the right way...
I didn't find logic to create a layout on the same div element I used as a Paging component

Any thougths?

EDIT
----------------------------
Well it seems that there is no need for especifying a toolbar, as soon as I make my paging div element a layout it renders bien


innerLayout.add('south',new Ext.ContentPanel('paging', {title: 'Feed Articles'}));


It seems pretty logic but still not feeling this is the right solution.