Thanks, Martin! 

I just updated wicket to 6.3.0 and removed the href="#" from my html
template.  Wicket does generate a relative url in "href=" relative to the
current url.   This, however, does not solve the issue with JQuery Mobile,
which loads
href="com.alcatel_lucent.nms8770.awol.client.web.page.MetaprofileListPage"
based on the first page it loads, not the current url.  

The following links to JQuery Mobile explain its model: 

http://jquerymobile.com/demos/1.2.0/docs/pages/page-links.html
http://jquerymobile.com/demos/1.2.0/docs/pages/page-navmodel.html

Basically in JQM the first page of a site that is visited is a "base". It
constructs the URLs for other pages by appending # and the URL to that page
to the base URL. So, if the first page visited is
http://example.com/index.html and the user then clicks on a link to
someotherpage.html, the URL is
http://example.com/index.html#someotherpage.html. But it fixes up the URL
shown in the navigation bar of your browser so that it appears as
http://example.com/someotherpage.html.  

In my case, the first page of my site is http://127.0.0.1:7999, which is the
"base", so the URLs of all the other pages of this site are constructed
based on this "base", not the current url.  Therefore, if 

href="./com.alcatel_lucent.nms8770.awol.client.web.page.MetaprofileListPage"

JQM will load 

http://127.0.0.1:7999/com.alcatel_lucent.nms8770.awol.client.web.page.MetaprofileListPage

which will not find the page since Wicket has the page at 

http://127.0.0.1:7999/wicket/bookmarkable/com.alcatel_lucent.nms8770.awol.client.web.page.MetaprofileListPage

I also posted the question at JQM forum, it appears there is no way to
change JQM behavior.  So my remaining options are to change my wicket code
to either 1) generate href= with absolute/full path (i.e.,
href="wicket/bookmarkable/com.alcatel_lucent.nms8770.awol.client.web.page.MetaprofileListPage)
 
OR 2) override the wicket default bookmarkable mapper not to store the page
under wicket/bookmarkable but to the base so
href="com.alcatel_lucent.nms8770.awol.client.web.page.MetaprofileListPage"
will find the page.

Could you suggest any mechanisms in Wicket, which I hope exists, to
accomplish either 1) or 2) above?   some code example/snippet would be even
better.   I have been struggling with this issue for a long while... your
help would be much appreciated!!  Thanks.




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-override-URLs-generated-by-bookmarkable-mapper-tp4654005p4654045.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

Reply via email to