How to create and map a Javascript variable in Appery, 2015
Posted: Sun Jan 18, 2015 2:59 pm
by Manabendra Gogoi
Could you please throw some light on how in this tutorial: http://devcenter.appery.io/tutorials/... you could map the javascript variable "listTables" to the response of the service. I mean, you can't do it that way in the latest version of appery, I believe. Is there someway I could use the same code and map the javascript just like in the old version? Further, I need to know what will happen to the created offline database "Wedding 0.1" (which I believe is Web SQL) once we exit the app? Will the data still be stored and hence be available next time we start the app even without connectivity?
How to create and map a Javascript variable in Appery, 2015
Posted: Mon Jan 19, 2015 8:20 am
by Illya Stepanov
Hi Manabendra -
Yes, you can still use your variable, but it should be used inside generic service response as a return value. You can use that generic service in your mapping.
How to create and map a Javascript variable in Appery, 2015
Posted: Mon Feb 09, 2015 10:21 am
by Manabendra Gogoi
Dear Illya,
I think you misunderstood what I asked. Just have a look at the example response mapping. The "body.$" is directly mapped to the javascript variable "listTables". I would request you to elaborate how to achieve such mapping as I am certain there is no way to map directly to a javascript variable. Please provide an example if possible.
Regards,
Manabendra
How to create and map a Javascript variable in Appery, 2015
Posted: Tue Feb 10, 2015 2:38 am
by Yurii Orishchuk
Hello,
You can make link from array response to array storage in following way:
Open "Storage and models".
Add new model with type "Array". http://prntscr.com/4uey7v/direct
Add storage with type model from 2nd step. http://prntscr.com/4ueyq8/direct
Navigate to "success" mapping.
Make link from "$" to storage from 3rd step: http://prntscr.com/4ueyzi/direct
Regards.
How to create and map a Javascript variable in Appery, 2015
Posted: Tue Feb 10, 2015 12:45 pm
by Manabendra Gogoi
Thanks Yurii! I have absolutely understood your point and it is working.
Regards,
Manabendra