This was a problem I encounter while developing on wicket. This example is based on wicket 1.2.4.
The problematic was the use of a pop-up to use for searching. The search result are link that will make change the page under the pop-up to display the item clicked but without closing the pop-nor, nor we want to change it because we still want to access all the link.
This is the code to load the pop-up :
As we can see, there is nothing new in this code except that we have to make sure to enter in the page parameters the name of the current pagemap.
Now here is the way to create the pop-up with a link that will make change the browser window (not the pop-up)
If we want the link to work, we have to put the pageMap in the BPL. Also, we have to modify the attribute "target" of the link to be sure it will modify the good window.
Now the not so instinctive thing about this is the parentPagMap name. It is that Wicket will not create a pagemap name by default. The default page map will have a name set to null. This is not a problem because we are able to fetch the pageMap with a null key. The problem is that we need to communicate to the window. Since the target is normally equal to the pageMap name, if the pageMap name is null, Wicket will set the window.name to "wicket:default". This issue is linked with JIRA : https://issues.apache.org/jira/browse/WICKET-206
This code will be obsolete when the JIRA issue will be resolved so this page will need updating.