Hybrid View

  1. #1
    Sencha User
    Join Date
    Jun 2011
    Posts
    42
    Vote Rating
    0
    Answers
    2
    anthoang is on a distinguished road

      0  

    Default 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.

    MyApp.cards.query('#myList')[0].setStore(store);
    Everything works fine in SenchaTouch2pr3 - I'm able to view my list of items.

    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.

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,647
    Vote Rating
    899
    Answers
    3575
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    What does your list look like?
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    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 in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Feb 2012
    Posts
    255
    Vote Rating
    2
    Answers
    6
    landed is on a distinguished road

      0  

    Question 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.

  4. #4
    Sencha User
    Join Date
    Jan 2012
    Posts
    27
    Vote Rating
    0
    passion4code is on a distinguished road

      0  

    Default


    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

  5. #5
    Sencha User
    Join Date
    Feb 2012
    Posts
    255
    Vote Rating
    2
    Answers
    6
    landed is on a distinguished road

      0  

    Default


    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.

  6. #6
    Sencha User
    Join Date
    Jun 2011
    Posts
    42
    Vote Rating
    0
    Answers
    2
    anthoang is on a distinguished road

      0  

    Default


    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?