Hmm.. The problem with this kind of bugs is that it's very difficult to
reproduce.
IMHO The problem is in this line:
else {document.location.href =
'/page/SomePage;jsessionid=E43E09C7B61190F3C8C5E98CB988F21F?';}
The url should contain pagemap name (something like wicket-1).
In wicket-1.2 the url is built in PageMapChecker#renderHead
(WebPage.java line 388 -
IBookmarkablePageRequestTarget current =
(IBookmarkablePageRequestTarget)target;
BookmarkablePageRequestTarget redirect = new
BookmarkablePageRequestTarget( getSession().createAutoPageMapName(),
current.getPageClass(), current.getPageParameters());
url = cycle.urlFor(redirect);
)
I wonder why the generated url doesn't contain the pageMap name.
-Matej
Ittay Dror wrote:
> further investigation shows that for IE and openning new windows, it works
> fine - a PageMap instance is created, and the page loads fine.
>
> i've also started firefox with a new profile (no extensions), to make sure
> it's not extension related, and no, it happens there also, and also when i
> open a new window instead of new tab. it seems to be related to differences
> in cookie (session) handling between firefox and IE.
>
> ittay
>
> Ittay Dror wrote:
>> Hi,
>>
>> I'm using firefox. when i duplicate a tab, the tab reloads in an infinite
>> loop.
>>
>> this is the reason:
>> <script type="text/javascript"><!--//--><![CDATA[//><!--
>> var pagemapcookie = getWicketCookie('pm-nullwicket');
>> if(!pagemapcookie && pagemapcookie !=
>> '1'){setWicketCookie('pm-nullwicket',1);}
>> else {document.location.href =
>> '/page/SomePage;jsessionid=E43E09C7B61190F3C8C5E98CB988F21F?';}
>>
>> //--><!]]></script>
>>
>> </head>
>> <body onunload="deleteWicketCookie('pm-nullwicket');">
>>
>>
>> what happens is that the pagemapcookie is there when the page is rendered,
>> because the previous page was not unloaded, so the document's href is
>> changed to itself. of course, when the page loads, the cookie is still 1, so
>> the loop continues. the same will happen if i just open a new tab and load
>> the same url.
>>
>> what gives?
>>
>>
>> also, the code that writes this script is WebPage.PageMapChecker the comment
>> in the code is:
>> /**
>> * Tries to determine whether this page was opened in a new window or
>> tab.
>> * If it is (and this checker were able to recognize that), a new page
>> map
>> * is created for this page instance, so that it will start using it's
>> own
>> * history in sync with the browser window or tab.
>> */
>>
>> i've tried to debug this, but it doesn't look like a new PageMap is created
>> (i don't use it, so the PageMap instance is the default one). so it seems i
>> *don't* get a history per tab.
>>
>> can/should i remove the AutomaticMultiWindowSupport setting?
>>
>> thanx,
>> ittay
>
>
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user