BookmarkablePageRequestTargetUrlCodingStrategy.decode() is only called for a mountable page.
And the the pagemap is not in the url as a normal query param but it is encoded like a path:
so you have this:
/wicket/compref?wicket:bookmarkablePage=wicket-0:wicket.examples.compref.BookmarkablePageLinkPage
and this:
/wicket/niceurl/the/homepage/path/wicket:pageMapName/wicket-0
The first the pagemap is encoded in the WebRequestCodingStrategy
and the latter the url is encoded in the BookmarkablePageRequestTargetUrlCodingStrategy
So if the first is hit the second one will not be called because it is not a mountable bookmarkable url. So the pagemap will not be overridden.
If the second one is hit then the url was a mountable url and the pagemap wasn't set anyway. And was not a normal query param.
And the pagemap is extracted from the decoded params that where in the url path.
johan
On 6/7/06, Johan Compagner <
[EMAIL PROTECTED]> wrote:
Do you have a testcase that shows when it goes exactly wrong?
I guess this part:
final String pageMapName = (String)parameters.remove(WebRequestCodingStrategy.PAGEMAP);
requestParameters.setPageMapName (pageMapName);
should be
final String pageMapName = (String)parameters.remove(WebRequestCodingStrategy.PAGEMAP);
if(pageMageName != null) requestParameters.setPageMapName(pageMapName);
so that it doesn't overwrite a pagemap name that could already be set. By normal pagemap params.
But i don't get why that didn't show before in some example/unit test.
johanOn 6/7/06, [EMAIL PROTECTED] < [EMAIL PROTECTED]> wrote:> This is for wicket to properly support multiple tabs/windows. If you
> open a link in new tab / window, page should be stored in different
> pagemap. Does the _javascript_ cause you any problems?
>> -Matej
>
Regarding pageMap name, something is probably wrong:
in the class
wicket.protocol.http.request.WebRequestCodingStrategy
the method
public final RequestParameters decode(final Request request)
removes wicket:xxx parametes (that means even i pageMapName parameter,
which is needed later in class
BookmarkablePageRequestTargetUrlCodingStrategy.decode
...
final String pageMapName =
(String)parameters.remove(WebRequestCodingStrategy.PAGEMAP)
- that is "wicket:pageMapName" - which was alredy removed from parameters ..
Method from addBookmarkablePageParameters is looking for different
string (not mounted page ...)
saki
> [EMAIL PROTECTED] wrote:
>> Hello,
>> I'm currently working on project where are integrated wicket(version
>> 1.2)
>> with existing servlets producing html lists. From the list we are
>> opening
>> wicket form
>> using link http://localhost:8080/amadeos/fa/fct?id=2 . Form is mounted to
>> that url and it works. But sometimes happens (especially with multiple
>> windows) than the opened page gets rendered in some kind of redirect
>> cycle, it renders again and again, blank page displayed. In the browser
>> is
>> the url changed to
>> http://localhost:8080/amadeos/quote/fct?wicket:pageMapName=wicket-0&id=1
>> and if I look to the generated source code of page, I see following
>> _javascript_, which is setting browser location:
>>
>> <script type="text/_javascript_"
>> src=""
>> <script type="text/_javascript_"><!--//--><![CDATA[//><!--
>> var pagemapcookie = getWicketCookie('pm-null/amadeoswicket_servlet');
>> if(!pagemapcookie && pagemapcookie !=
>> '1'){setWicketCookie('pm-null/amadeoswicket_servlet',1);}
>> else {document.location.href ="">>> '/amadeos/quote/fct?wicket:pageMapName=wicket-0&id=1';}
>>
>> //--><!]]></script>
>>
>>
>> Any clue where is the problem, what I do wrong ?
>>
>> Thanx for any ideas.
>>
>> saki
>>
>>
>>
>>
>>
>>
>> _______________________________________________
>> Wicket-develop mailing list
>> Wicket-develop@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/wicket-develop
>>
>
>
>
> _______________________________________________
> Wicket-develop mailing list
> Wicket-develop@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-develop
>
_______________________________________________
Wicket-develop mailing list
Wicket-develop@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-develop
_______________________________________________ Wicket-develop mailing list Wicket-develop@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-develop