-
27 Nov 2011 4:29 AM #1
Unanswered: Sencha Touch v2 pullrefresh and listpaging
Unanswered: Sencha Touch v2 pullrefresh and listpaging
Hi all
I am trying sencha touch v2 for the better list peformance
but it seems that the plugins pullrefresh and listpaging are not working
does someone got them working
Thanks in advance
this is my index.js
Code:Ext.require([ 'Ext.data.Store', 'Ext.List', 'Ext.Panel' ]); Ext.setup({ tabletStartupScreen: 'tablet_startup.png', phoneStartupScreen: 'phone_startup.png', icon: 'icon.png', glossOnIcon: false, onReady : function() { Ext.regModel('ListItem1', { fields: [ {name: 'id'}, {name: 'created_at'}, {name: 'source'}, {name: 'text'}, {name: 'name', mapping: 'user.name.substring(0,62);'}, {name: 'profile_image_url', mapping: 'user.profile_image_url'} ] }); var store = new Ext.data.Store({ model: 'ListItem1', autoLoad: true, //remoteFilter: true, //sortOnFilter: true, //sorters: [{property : 'lastname', direction: 'ASC'}], pageSize: 200, clearOnPageLoad: false, proxy: { type: 'ajax', url: 'http://www.hws-koeriers.nl/hws/flex/home1.php', reader: { //root: 'profile', type: 'json' }, extraParams: { rpp: 200, suppress_response_codes: true } } }); console.log(store.loadPage(0)) var groupingBase = new Ext.List({ fullscreen: true, //itemTpl: '<div class="contact2"><strong>{name}</strong> {text}</div>', itemTpl: new Ext.XTemplate( '<div class="x-tweetanchor">', '<div class="tweet-bubble"><img src="{profile_image_url}" /><h2>{name}</h2></div>', '<div class="tweet-content">', '<p>{text:this.linkify}</p><strong></strong></div>', '', '<span class="posted">{created_at} via {source}</span>', '</div>', '</div>', { linkify: function(value) { return value.replace(/(http:\/\/[^\s]*)/g, "<a target=\"_blank\" href=\"$1\">$1</a>"); } } ), indexBar: true, store: store, plugins: [{ ptype: 'listpaging', autoPaging: true }, { ptype: 'pullrefresh' }] }); var panel = new Ext.Panel({ layout: 'fit', dockedItems: [{ xtype: 'toolbar', dock: 'top', title: 'Flexcourier', },{ xtype: 'tabbar', dock: 'bottom', pack: 'center', activeTab: 0, items: [{iconCls: 'info', title: 'Timeline', cls: 'card1'}] }], fullscreen: true, items: [groupingBase] }); panel.show(); } });
-
27 Nov 2011 6:53 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,710
- Vote Rating
- 436
- Answers
- 3113
That plugin looks to be ported but not fully flushed out.
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.
-
27 Nov 2011 8:06 AM #3
So would it be possible to use it again
maybe to load it mannually into the app ..
I tryed to insert the script manully but receive an error
Ext.plugins.PullRefreshPlugin.js:1Uncaught ReferenceError: Ext is not defined
-
30 Jan 2012 10:56 AM #4Sencha - Services Team
- Join Date
- Mar 2008
- Location
- Winnipeg, Canada
- Posts
- 215
- Vote Rating
- 1
- Answers
- 3
That should do it ... there are a few 'bugs' to work out - will post them in the bug forum.Code:plugins: [ { type: 'listpaging' }, { type: 'pullrefresh' } ]
Kev
-
23 Feb 2012 12:41 AM #5
Hi !
I work with phonegap in a webview and I am trying to have a list of 600 contacts items list with correct performance on old phones (I'm testing on an iPod Touch 2nd generation and an android HTC Wildfire).
With defaults settings, the list is super fast on recent phones but takes 6 to 8 secondes to be usable (after it is displayed) on the old ones.
I tried the listPaging plugin with a small pagesize (under 50) but it didn't help.
Worst : It degraded the list responsiveness on recent phones ! (here, an iPhone 4S)
So I commented it all.
Do you know if the listPagin will be ready for the senchatouch2 release ?
Do you think listPagin can help with slow devices ? or is it only for huge (>1000) list management on modern phones?


Reply With Quote