Page 1 of 1

clickable list

Posted: Sun Jan 25, 2015 11:01 am
by Spark Chao

how to make a clickable list offline?
user can add item to wish list,click a button to open the list page.

page one:user can select one item of list(navigate to next page)

page two:list the items from db which user selected previously(navigate to next page).

page three:select one of them(open the item's detail page).

I try to do that by your tutorial but not working.(Creating a master-detail page态Building a clickable list app with HTML5 local storage)

by the way,how can I select the item (in page three) and record on the wish list of the user.

thanks for your help


clickable list

Posted: Sun Jan 25, 2015 3:59 pm
by Alena Prykhodko

Hello,

We do not have tutorial for such case.
This can be done with usage of localStorage variables.
Use this example to think offline logic http://devcenter.appery.io/tutorials/...


clickable list

Posted: Sun Jan 25, 2015 4:14 pm
by Spark Chao

sorry~
i have a problem to create a clickable list form database not from REST service.
i can do that by this tutorial in html5 "Building a clickable list app with HTML5 local storage".
But how to make it from database?


clickable list

Posted: Sun Jan 25, 2015 4:26 pm
by Alena Prykhodko

You need to set up Service to populate data, read more here http://devcenter.appery.io/documentat...
Also, most tutorials dial with such queries http://devcenter.appery.io/tutorials/...


clickable list

Posted: Mon Jan 26, 2015 11:03 am
by Spark Chao

I just study the tutorials above,but still can't figure out how can do that.
A lot of people also have the question on this community ,will you guys release a tutorial for this issue?


clickable list

Posted: Mon Jan 26, 2015 11:36 am
by Spark Chao

I can't do that by the "Creating a master-detail page" tutorials.
Is this step correct in this version of appery.io?
Image


clickable list

Posted: Tue Jan 27, 2015 1:50 pm
by Maryna Brodina

Hello!

Could you clarify in more details what do you do and what exactly doesn't work?


clickable list

Posted: Wed Jan 28, 2015 4:30 pm
by Spark Chao

Maryna
i already can use queries of database api to did that.
but i have one more question about Multiple where clauses "$and".
i set two values at page two and set storage variable in storage.
Image

at page three i create a service of Multiple where clauses.
and input the two variables from storage to where. Image

also edit the js below.
Image

if i choice category2 and 103,it should show "test22" in detail page.
but it show "undefined".

did i do something wrong?
Image

http://appery.io/app/mobile-frame?src..."


clickable list

Posted: Thu Jan 29, 2015 10:17 am
by Spark Chao

i already did it by enter below JS

var value1 = localStorage.getItem('name_input');
var value2 = localStorage.getItem('category_input');
return '{"$and": [{"name": "'+value1+'"},{"category": "'+value2+'"}]}';

good job!!


clickable list

Posted: Thu Jan 29, 2015 10:21 am
by Evgene Karachevtsev

Hello Spark,

Thank you for the update, glad it works!