Page 1 of 1

Need help with a clickable list from a database

Posted: Wed Jul 31, 2013 8:30 am
by Chris Whitfield

Hello,

I'm creating a clickable list app from a database and have been following this tutorial.

http://docs.appery.io/tutorials/build...

The only difference it seems is that the data is coming a database stored on appery vs a public xml feed.

ive managed to get all the items listed on a start page. The problem occurs when i click any item to get to its details page. Any item i click goes to the same details page.

My guess is that im doing something wrong when it comes to storing the item ID but i can't seem to figure it out.


Need help with a clickable list from a database

Posted: Wed Jul 31, 2013 8:32 am
by Chris Whitfield

another piece of info is that the details page info seems to be coming from the last row in the database. Again, this last row of data shows every time i click a different item in the list.


Need help with a clickable list from a database

Posted: Wed Jul 31, 2013 10:44 am
by Maryna Brodina

Hi, could you post your public app link?


Need help with a clickable list from a database

Posted: Wed Jul 31, 2013 5:14 pm
by Chris Whitfield

Need help with a clickable list from a database

Posted: Thu Aug 01, 2013 7:29 am
by Maryna Brodina

Hello!
1) You have error in service MyCountryApp_mycountryapptestdb2_list_service. You should rename request parameter attraction-id to where and untick Header for this parameter (http://docs.appery.io/documentation/b...)
2) on startScreen delete mapping from id to tagId
3) On AttractionDetails in mapping from tagId to where add JS:
codereturn '{"id": "' + value + '"}';/code


Need help with a clickable list from a database

Posted: Thu Aug 01, 2013 10:23 pm
by Chris Whitfield

This is perfect and it worked!


Need help with a clickable list from a database

Posted: Thu Aug 01, 2013 10:23 pm
by Chris Whitfield

Thank you!