jQuery Mobile and page transitions in Apex - how do they go together?
TobiPFeb 14 2013 — edited Feb 15 2013Hi guys,
I started off on a jQuery Mobile project with APEX - although I am still quite new to both. I have done quite a bit of research, but I haven't found really anything substantial about how they go together.
Rather it appears to me, that both have their own way of dealing, that is to say recieving and sending data. Apex with normal http-requests, just a little AJAX on the side maybe, JQM almost only with AJAX.
So I am running into a lot of trouble, when I use functions like apex.redirect() or .submit(), the $mobile.changePage() mostly doesnt how I want. Page content often stays in the DOM with JQM unwanted, data are sometimes not refreshed properly, or when I close a popup box, an unwanted reload takes place. Events are not bound the usual way, etc. etc.
I certainly thoroughly have studied the JQM documentation, looked through many other tutorials and blogs, but basically I still lack in a lot of basic understanding, especially the communication between JQM and APEX - after all, the APEX Smart Phone UI from 4.2 is still quite new. And all tutorials about data management with JQM deal with JSON objects or XML - methods we can't get into due to time reasons.
I have two questions to the community:
A) Is it really recommendable to use a JQM framework with the "normal" page-show and page-submit events, that APEX delivers? Or if not recommendable, is it practical?
B) Maybe some experienced users here can hint me to some recourses that specifically deal with the issues I mentioned above: e.g. How does JQM handle the urls it gets, when you use the APEX javascript functions? What global JQM settings are recommendable when using APEX, or what object-parameters should you use in the $.mobile.changePage() call?
And one specific problem I just ran into: How does JQM treat Page-0 items? I use them for global application control, but for some strange reasons, they sometimes seem to be resettet.
So these are a lot of questions, but I don't seek detailed answers here, rather some general guidence and advise. Any help is most appreciated.
So long, with best regards,
tobi
Edited by: TobiP on 14.02.2013 13:41