Page 1 of 3
how to populate a listview from a json response?
Posted: Thu May 23, 2013 4:42 pm
by John Herdean
HI, Im receiving a json response in a list. I mapped all my elements already. But now Im seeing that I might actually have to wait for my test response to map the elements..?? Well, im not sure (thats how it seems to be for a select menu list). Besides that, do i have to check off the array box thats next to each element?
Well, so far Im unsure about the above.... I would like to get clarity on it, and in addition to that if i could get some step by step instruction on how i complete the entire process would be great help. The is my 1st time obviously so I could use all the help i could get. Thanks
how to populate a listview from a json response?
Posted: Thu May 23, 2013 4:44 pm
by maxkatz
I don't understand the question... what exactly do you want to do or doesn't work?
how to populate a listview from a json response?
Posted: Thu May 23, 2013 5:11 pm
by John Herdean
you told me some days ago to Use jQuery/jQuery Mobile API to do that.
I checked the documentation for it and cant seem to find the step by step instruction on how to populate a list from a json response?
im receiving a list of records with the result in a json format, how can i populate my custom list from that response..,. Im using a listview component in my UI design..
how to populate a listview from a json response?
Posted: Thu May 23, 2013 5:12 pm
by John Herdean
i have not tried to implement the response yet, I just really want to know what are the steps to do it the right way??
how to populate a listview from a json response?
Posted: Thu May 23, 2013 5:48 pm
by maxkatz
Why not use Appery.io mapping feature to populate the list?
how to populate a listview from a json response?
Posted: Thu May 23, 2013 5:57 pm
by John Herdean
what does that mean exactly? do i need to 1st click the "Automatically Create Service Response" after i hit the test button? then map? because i already mapped it before i tested it... Please be more specific....??
how to populate a listview from a json response?
Posted: Thu May 23, 2013 6:26 pm
by maxkatz
Yes, these are the steps:
Create service, set URL
Create request parameters
Test
Automatically create response parameters (or manually)
Add service to the page
Bind service to the page
Most of our tutorials show how to setup and map a service to a page: http://docs.appery.io/tutorials/
how to populate a listview from a json response?
Posted: Thu May 23, 2013 6:31 pm
by Kateryna Grynko
HI John,
You can find detail steps here:
http://docs.appery.io/tutorials/build...
how to populate a listview from a json response?
Posted: Fri May 24, 2013 12:25 am
by John Herdean
yes, i did the steps above. but when i do the live test - on the respective page - there is no listview. not even the static one i had before is showing up.
Im not sure what you mean by binding the service, but im assuming you mean to map the items (which i did). If thats not what you meant, please explain. Other than that, heres some snapshots of what my results look like:
how to populate a listview from a json response?
Posted: Fri May 24, 2013 6:13 am
by Maryna Brodina
Hello!
1) In you screenshot the first line is $driver-pending-loads-list - it's not correct, if you get an array in response the first line should be just $
2) Please check if you invoke the service (on page Show event add Invoke service action)