If a ResourceLink is used with PopupSettings (in our case a custom PdfPopupLink) the target page is created in the main pagemap (name=null) and not in the pagemap from the PopupSettings. This is caused by not calling the isLinkClicked()-Method from the onResourceRequested()-Method in the ResourceLink-Class. The PageMap-Name is not set to the RequestParameters and so wicket uses the main pagemap.
If using an AccessStackPageMap the WebRequestCycleProcessor will now ignore every AjaxRequest from the original page, because the original page is no longer on top of the access stack.
Solution: calling onLinkClicked() instead of onClick in onResourceRequested()-Method of the ResourceLink