On Tue, Oct 23, 2012 at 12:40 PM, Martijn Dashorst
<martijn.dasho...@gmail.com> wrote:

> Think for a moment about what you are asking: a bookmarkable page link
> with a session relative component. Bookmarkable page link's URLs are
> *bookmarkable*. They can be stored in favorites, and opened two
> seconds, two weeks or two years from now.
>
> What does the page ID point to in 2 weeks? Or 2 years from now?
> Bookmarkable links and session relative stuff don't mix.
>
> So instead of encoding such in the URL, why not let your base page (or
> something similar) query the page store for a page of a certain type,
> and get a page reference to that.

Unfortunately the world is not perfect ..

Using BookmarkablePageLink or just Link is the same if the target page
is stateful, i.e. has the pageId parameter in the produced url.
The benefit is that BPL does one http redirect less then when using Link.

Bookmarking the target page doesn't know anything about the current
session/state by itself.
The only problem is when you bookmark a url like:
.../wicket/page?pageId....  This may or may not be resolved to a page
if requested after 2 years. The real problem is if it is resolved then
most probably it is not the right page.
If the url is .../my/mount/path?pageId... then you will go to the
wanted page, just in its initial state.

>
> Martijn
>
>
>  Mon, Oct 22, 2012 at 6:03 PM, Leonardo D'Alimonte
> <leonardo.dalimo...@loginet.it> wrote:
>> Hi,
>>
>> I'm working on the migration of our project from Wicket 1.4 to Wicket 1.5
>> and I'm trying to fix support of a 'back' link, that before was implemented
>> using PageMap and now.....well, PageMap are gone!
>>
>> I read on different forums that PageReference could be an answer to my
>> problem by calling inside onClick method
>> setResponsePage(pageReference.getPage())....but I cannot still understand
>> how I can pass a PageReference to a BookmarkablePageLink.
>>
>> Is there a quick way to build a 'back' link with Wicket 1.5?
>>
>> Thanks in advance for your answer!
>>
>> Leonardo
>>
>>
>>
>> --
>> View this message in context: 
>> http://apache-wicket.1842946.n4.nabble.com/Using-PageReference-for-a-back-link-tp4653212.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
>>
>
>
>
> --
> Become a Wicket expert, learn from the best: http://wicketinaction.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to