1. #1
    Sencha Premium Member
    Join Date
    Feb 2012
    Location
    Brisbane
    Posts
    244
    Answers
    10
    Vote Rating
    3
    SuperRoo is on a distinguished road

      0  

    Default Unanswered: List not getting data

    Unanswered: List not getting data


    Hi,
    I have a json store connected to a list the url is "http:\\localhost\mobile\data\appointmentList.json" and in the designer the data comes through and shown on the list.
    However when I run the project in Google....no list and no errors?

    Any ideas?

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,522
    Answers
    3447
    Vote Rating
    814
    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


    You need to do some debugging. First, I would add a listener to the store's load event and simply console.log out the store.getCount() and that will tell you if the store has data. If it doesn't there is a problem. If it does, which I am betting on, then you need to look at the DOM. Does the <div> for the list have a height. If not then you need to specify a height either with the height config or a layout of the list's parent container. If not then you need to go down a few levels to where the <div>s are for the rows. Are the elements you specified in your itemTpl empty? If so then it's usually that model fields aren't valid to your response data.

    I'm betting that your store has data, your itemTpl and model fields are correct but your list has no height.
    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 Premium Member
    Join Date
    Feb 2012
    Location
    Brisbane
    Posts
    244
    Answers
    10
    Vote Rating
    3
    SuperRoo is on a distinguished road

      0  

    Default Re: List not getting data

    Re: List not getting data


    Hi Michael,

    still not getting the concept here !!!!!
    I am using the designer.....I load the store in the designer and the data loads and the attached list outputs the data as per expected.
    When I view the saved application in a chrome browser I get no list of data.....why is the designer different from the browser??? Isn't the idea of the designer to prototype the design before viewing it on a browser screen??
    I'm getting pretty frustrated with the whole concept here...if what I do on the designer doesn't correlate to the browser then I may as well use notepad to write my scripts!!

    Followed you advice and put a listener on the store with an alert on the load....nothing...no alert on the browser.
    Looking at the DOM I get no markup for the list, let alone the data.

    The only difference I can see between the browser and the designer is that I manually load the store and it works.....is there something I have to do to load the store on application start in the browser? The store is registered in the application.

    Regards

  4. #4
    Sencha Premium Member
    Join Date
    Feb 2012
    Location
    Brisbane
    Posts
    244
    Answers
    10
    Vote Rating
    3
    SuperRoo is on a distinguished road

      0  

    Default Re: List not getting data

    Re: List not getting data


    Hi Mitchell,

    solved the problem....needed to select autoload on the store to get it to automatically load on controll load.

    Now everything is working fine.

    Thanks for your help

    Regards

Thread Participants: 1

Tags for this Thread