-
31 Oct 2012 6:03 AM #1
Unanswered: MVC and sliding pager
Unanswered: MVC and sliding pager
I am using mvc to create a tabbed grid with a sliding pager on the bottom bar. My problem is: I can not click on the sliding pager. I am stuck on the first page. Attached you will find my code, Please tell me what I am doing wrong:
Here is what my controller looks like(models,stores,views list emptied ):Code:"app.js" Ext.Loader.setConfig({enabled:true}); Ext.application({ name: 'AM', appFolder: 'app', controllers: ['TabsController'], requires: [ 'Ext.grid.*', 'Ext.data.*', 'Ext.tab.*', 'Ext.toolbar.Paging' ], launch: function() { } });
Here is a picture of what the bottom bar looks like:Code:Ext.define('AM.controller.TabsController', { extend: 'Ext.app.Controller', models: [..], stores: [...], views: [...], init: function() { Ext.create('Ext.tab.Panel', { //layout: 'fit', height: 700, width: 620, activeTab: 0, items: [ {xtype: 'one'}, {xtype: 'two'}, {xtype: 'three'}, {xtype: 'four'} ], //bbar: Ext.create('Ext.toobar.Paging', { bbar : { xtype:'pagingtoolbar', pageSize: 50, store: this.stores, displayInfo: true, plugins: Ext.create('Ext.ux.SlidingPager', {}) },//), renderTo: document.body }); } });
-
2 Nov 2012 6:12 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,666
- Vote Rating
- 435
- Answers
- 3109
Paging toolbar is meant to work with one store but looks like you are giving it one store.
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
2 Nov 2012 9:44 AM #3
ok... I was hoping
will work. Clearly it doesn't.HTML Code:store: this.stores
Is there a way to make this work?
I tried adding all the stores (below)and it only worked for the first store.
HTML Code:store: 'store1', store: 'store2',
-
2 Nov 2012 10:48 AM #4Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,666
- Vote Rating
- 435
- Answers
- 3109
Of course it only worked for the last store given, properties of an object must be unique and last one will overwrite any that come before.
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.


Reply With Quote