I'm close to wrapping up my first JQM app, and for the most part I love it, so many thanks to all those who've made it happen.
I have one outstanding issue though that I haven't been able to resolve, even after doing a lot of searching through the docs and forum.
I have a 4-page JQM webapp here -
http://dgoco.com/search/
It's a property search app with
Page 1) The search form
Page 2,3) The results pages - one a list, the other a map
Page 4) A details page for an individual property
I'm 99% done, but can't seem to properly maintain state across multiple platforms.
The desired result is that every time the user goes "forward" in the application, the target page is populated with new data (json from a RESTful API). But when the user goes 'back', the previous page is exactly as they left it.
Currently, all the JS code is included within the data-role="page" div as opposed to the header. And currently I'm using live('pageshow') for each page to trigger the updates.
One complication is that the App needs to function with Request Parameters, since end-users will be pushed directly to specific properties or groups of such via print advertising & QR codes. Also, because of this, it makes sense (at least to me) to keep the app as separate pages instead of putting all the functionality in a single page.
I've tried every combination of 'live' vs 'bind' and 'pageshow' vs 'pageinit', but still can't get the application to work for Android. iOS seems to work fine, but not Android.
In particular, I run into the "...pageinit fires multiple times...' problem.
I've read the docs, but they don't seem to apply to a dynamically-updated multiple page architecture.
Can anyone point me to the 'correct' way to handle this type of architecture?
Do I need to completely re-architect?
Do I need to take control of page caching?
Any help is appreciated.