-
7 Nov 2012 1:24 AM #1
Unanswered: Upgraded to ST2.1 just broke my dataview
Unanswered: Upgraded to ST2.1 just broke my dataview
Hi guys,
I've just upgraded from ST2.0.0 to ST2.1. I'm getting the following error (attached image)...
Screen Shot 2012-11-07 at 11.21.45 AM.jpg
Note that "app.js.716" points to my dataview (below the error)
Can anyone advise please?Code:var schedule = Ext.create('Ext.DataView', { itemTpl: tpl, store: offlineStore, scrollable: true, emptyText: '<div style="margin-top: 20px; text-align: center">empty …nothing</div>', ....
Thank you,
Riyaad
-
9 Nov 2012 5:03 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 34,121
- Vote Rating
- 453
- Answers
- 3160
Looks like you are trying to use the PullRefresh plugin. This was only ever meant to work with Ext.dataview.List so it may have worked before but was not meant to work in Ext.dataview.DataView
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.
-
9 Nov 2012 5:35 AM #3
Hi Mitchell,
That would be correct, I'm using the PullRefresh plugin to allow the user to update his/her details in the dataview (info being pulled from offline store etc). So are you saying that as of v2.1 that this is no longer allowed in the dataview and that I may need to use the list instead (unless I decide to remove the PullRefresh plugin)?
Regards
R
-
9 Nov 2012 8:29 AM #4Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 34,121
- Vote Rating
- 453
- Answers
- 3160
Correct. That plugin is designed to only work with List and the List in 2.1 has changed to support infinite scrolling.
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.
-
13 Nov 2012 5:27 AM #5
Hi,
Thanks for that info. I think the documentation should be updated to reflect this. Will add a comment now.
Thanks,
Matt
-
4 Dec 2012 7:42 AM #6
How can i access to this plugin
How can i access to this plugin
i want the pullrefresh plugin (on my Ext.List) but where do i find the plugin ?
thanks
-
4 Dec 2012 12:36 PM #7
I had a similar problem, and ended up making a copy of the PullRefresh plugin, but without the List-specific code.
I think this plugin would be a good candidate for refactoring. There's the user-interface portion, which people might want to use on any component. And then there's the store-related code, which is only useful for DataViews. Maybe the latter could be moved into an adapter class, so the UI code is more reusable.
-
17 Dec 2012 2:32 PM #8
Would you mind posting that code? I am using both PullRefresh and ListPaging plugins with my DataViews.
-
18 Dec 2012 12:40 PM #9
To make it work with DataView, I think you only need to change line 147:
to something like:Code:list.container.insert(0, me);
My code has gone in a different direction since I did this, so there might be other changes that I forgot about.Code:list.container ? list.container.insert(0, me) : list.insert(0, me);


Reply With Quote