-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nested Lists #49
Comments
Found the cause of my error. I forgot to fill in the events property of my Backbone View. Differentiating the path given to handlers is still a question, though. |
Hi, As you've noticed, the typical url built by jquery mobile is in this form: #sourcepage&ui-page=something For instance, you could use: "#index([?&].*)?": "yourHandler" This will match urls with hash parameters (#index?id=foo&bar=baz) and nested pages (#index&ui-page=foo-1). edit: "#index$" and for the subpages: "#index[&](.*)" Cheers, |
Hi, Thanks for the info. But I'm actually using this regex for the main page: "^index$" And the problem is that all the pages are matching it despite each of JQM's pages for the sublists having something like: data-url="index&ui-page=0-0" I would construct a separate regex for the sublists if it seemed like JQM (or something) reported a different route/path for them, but that doesn't seem to be what's happening. I should note that I have this problem this is the initial page being loaded. Haven't yet observed its behavior when navigating to the page. As a work-around, I've found that the main page has a class called 'ui-body-c' where the sub list pages have 'ui-body-null'. I can check for the class in my handler and differentiate the actions to take.... but it's a hack. |
Hi, Seems to happen when navigating to the page as well except that the path/route is the appropriate url of the page. So, for instance, with a url like: /foo/bar/ and a regex: "/foo/bar/(?:[^#]*)?$" fires the associated handler multiple times, say for the 'pageinit' event, with match[0] == '/foo/bar/'. Let me know if I'm doing something wrong or if I can help debug at all. Thank you! |
Hi, In order to debug this issue, I need to know whether you're using ajax or not. Could you please send me a zip file with your test case? Thank you. |
I have a page with a few nested lists, which JQM renders into a multi-paged document where each list has an attribute like
data-url=index&ui-page=#-#
where each#
is a number assigned to the list. I also suspect thatindex
is taken from the original page's url.When the page renders, I'm getting this error from query.mobile.router.js
It seems to be generated once for each list, both parent and children.
Also, the router is firing events with a url that's just
index
, which exactly matches the main page. Is this intentional or a JQM issue? It would be more helpful if I could differentiate the creation events of the main page from the lists.The text was updated successfully, but these errors were encountered: