Wicketeers,

I have an odd issue - that isn't really a bug or a coding problem - but 
something I thought people might have some ideas on.

A little background first. I like to have URLs in my application, as per the 
examples below;

player
player/messages
player/messages/archive
player/messages/old
something
something/another/thing/or/whatever

etc.

Now - I'm trying to implement 'panel switching' (I honestly have no idea what 
this is called...) - where I only replace the parts of the page that actually 
need replacing, rather than recreating all elements of the page and 
re-rendering them.

This is, unsurprisingly, very easy with Wicket. It's easy to determine what 
needs replacing, and to actually replace them, via ajax. All good!

I also want the user to be able to 'refresh' the page and/or bookmark the page 
and have the page recreate itself from scratch. Again - this is pretty easy, 
using javascript and history.pushState etc.

The problem I have is when some of my Links are relative to the URL. So where I 
had a link that was relative to X/Y, when I push the URL to be X/Y/Z, all the 
relative links are out of date.

I guess the questions are; how can I make all Links absolute rather than 
relative? And, is there any way of doing this across the application? Are there 
other issues that could affect what I'm trying to do?

I realise I can just make all my URLs one level deep - so that all relative 
links work;

player
playerMessages
playerMessagesArchive

But it's simply not as pretty! :)

Cheers,
Col.
EMAIL DISCLAIMER This email message and its attachments are confidential and 
may also contain copyright or privileged material. If you are not the intended 
recipient, you may not forward the email or disclose or use the information 
contained in it. If you have received this email message in error, please 
advise the sender immediately by replying to this email and delete the message 
and any associated attachments. Any views, opinions, conclusions, advice or 
statements expressed in this email message are those of the individual sender 
and should not be relied upon as the considered view, opinion, conclusions, 
advice or statement of this company except where the sender expressly, and with 
authority, states them to be the considered view, opinion, conclusions, advice 
or statement of this company. Every care is taken but we recommend that you 
scan any attachments for viruses.

Reply via email to