I have an Apache Wicket-based application that I'd like to integrate with JQuery Mobile on so it looks more pleasing on mobile devices. Unfortunately, I am getting "Error Loading Page" errors for all the bookmarkable page links, which I never had problems with before JQuery Mobile was added to the mix. The root cause appears to be the URLs contained in the HTTP requests. I used Wicket 1.5.5, locally tested using jetty server 6.1.26 and FireFox 16.0, JQuery Mobile 1.2.0, JQuery 1.8.0. Here is the code snippet:
<ul data-role="listview" data-theme="b"> <li> List <#> </li> </ul> The corresponding java code: add(new BookmarkablePageLink<MetaprofileListPage>( "metaprofileList", MetaprofileListPage.class)); Based on the above, Wicket correctly replaced "#" in href="#" with real URLs where the pages are, so the final HTML looks like the following: <ul data-role="listview" data-theme="b"> <li> List <com.alcatel_lucent.nms8770.awol.client.web.page.MetaprofileListPage> </li> </ul> When the link is clicked , Jetty server sends the following HTTP Request with the following URL: GET http://127.0.0.1:7999/com.alcatel_lucent.nms8770.awol.client.web.page.MetaprofileListPage [HTTP/1.1 404 Not Found 0ms] This is not a correct URL for the MetaprofileListPage. As I understand, with the default bookmarkable mapper in Wicket, the correct URL is: http://127.0.0.1:7999/wicket/bookmarkable/com.alcatel_lucent.nms8770.awol.client.web.page.MetaprofileListPage As far as I know, I have no way of changing the way that JQuery Mobile constructs the URLs from the href=, I am looking for ways in Wicket to override the default "wicket/bookmarkable" context path to just "/"... For your reference, the only JQuery Mobile-related change I did was switching the headers in the HTML file from: <link rel="stylesheet" type="text/css" href="../../css/phone.css" media="only screen and (max-width: 480px)"/> <link rel="stylesheet" type="text/css" href="../../css/default.css" media="only screen and (min-width: 1025px)"/> <link rel="stylesheet" type="text/css" href="../../css/portrait.css" media="all and (max-device-width: 1024px) and (orientation:portrait)"/> <link rel="stylesheet" type="text/css" href="../../css/landscape.css" media="all and (max-device-width: 1024px) and (orientation:landscape)"/> <meta name="viewport" content="user-scalable=no, width=device-width"/> To the standard boilerplate jquery mobile includes: <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0, user-scalable=no"> <link rel="stylesheet" href="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.css" /> I have been struggling with this for 2 weeks now :-( What do I need to do to get Wicket and Jquery mobile to work loading the correct urls/pages? Please help!! Many thanks!! -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-override-URLs-generated-by-bookmarkable-mapper-tp4654005.html Sent from the Users forum mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org