Hybrid View
-
22 Feb 2012 1:50 AM #1
Unanswered: List no longer works in Sencha Touch Beta 3 : query or setStore() is broken?
Unanswered: List no longer works in Sencha Touch Beta 3 : query or setStore() is broken?
In my Sencha Touch 2 pr3 app, I have the following line of code to display a list in my "myList" list panel.
Everything works fine in SenchaTouch2pr3 - I'm able to view my list of items.MyApp.cards.query('#myList')[0].setStore(store);
But, when I migrate to Sencha Touch 2 Beta3, the list doesn't display (just a blank panel area). There are no error messages in the console. Is this a bug in the Beta3 version?
Everything else seem to be working in my app, except for the list.
-
22 Feb 2012 8:21 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,714
- Vote Rating
- 438
- Answers
- 3113
What does your list look like?
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.
-
22 Feb 2012 8:51 AM #3
Me two
Me two
My lists are working with json only when using a proxy - even using inline data I cant get a list to work ! so you as well have issues as a couple of us with the beta 3.
Can you try using a json proxy and let me know if that works.
-
22 Feb 2012 9:28 AM #4
I have an app using B3 that uses setStore on multiple lists and is making use of an ajax json reading proxy, no issues. I also have the PullRefresh and ListPaging plugin attached to those lists, not to mention they're in a navigation view
-
24 Feb 2012 6:27 AM #5
Things were ok with JSON but not xml as far as my problem went. I'm testing some things with the rc from yesterday. But now Im using dataview and a custom list item. It isnt working
it seems just to not display.
-
25 Feb 2012 4:38 PM #6
Kinda disappointing the Beta3 version broke the app using the PR3 version. But here are my screenshots,
The left screenshot (empty list) is using the Sencha Touch 2 Beta 3. The right screenshot (displayed list) is using the Sencha Touch 2 PR3 version.
screenshot_ST2b3.jpgscreenshot_ST2pr3.jpg
I verified the returned json data returned from the webservice is the same for both.
Here's my code that does the store,
*its a basic json call to Yelp API
Ext.define("Business", {
extend: "Ext.data.Model",
fields: [
{name: "id", type: "int"},
{name: "name", type: "string"},
{name: "latitude", type: "string"},
{name: "longitude", type: "string"},
{name: "address1", type: "string"},
{name: "address2", type: "string"},
{name: "address3", type: "string"},
{name: "city", type: "string"},
{name: "phone", type: "string"},
{name: "state_code", type: "string"},
{name: "mobile_url", type: "string"},
{name: "rating_img_url_small", type: "string"},
{name: "distance", type: "string"},
{name: "photo_url", type: "string"},
]
});
var urlAPI = '';
urlAPI = 'http://api.yelp.com/business_review_search?ywsid=MYYELPIDHERE&term=Pho&location=REDWOODCITY;
var store = Ext.create('Ext.data.Store', {
model: 'Business',
autoLoad: true,
proxy: {
/// call Yelp to get business data
type: 'scripttag',
url: urlAPI,
reader: {
type: 'json',
root: 'businesses'
}
},
listeners: { // when the records load, fire the callback
load: function (store) {
callback(store);
}
}
});
And here's the call that puts the store into the list,
MyApp.cards.query('#myList')[0].setStore(store); // then bind data to list and show it
Is there a workaround for this? or it's better i wait for the next Beta release?


Reply With Quote