[ 
https://issues.apache.org/jira/browse/WICKET-6337?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15923126#comment-15923126
 ] 

Martin Grigorov commented on WICKET-6337:
-----------------------------------------

In the description you say 

bq. So I can't cast this to my custom class that extends IPageManager

that's why it wasn't clear. You are not casting to IPageManager but to 
MyCustomPageStoreManager.

In branch WICKET-6337-IPageManager-removePage-7.x I've added the methods to the 
classes (not to the interfaces). You will need to create a helper method that 
uses the if/elses from my previous comment to be able to remove a page.

If this works for you and other devs think this is OK to be merged to 7.x then 
we will merge it.
Maybe someone else will have a better idea how to accomplish this in 7.x 
without API breaks.

> Wrong class type in PageAccessSynchronizer
> ------------------------------------------
>
>                 Key: WICKET-6337
>                 URL: https://issues.apache.org/jira/browse/WICKET-6337
>             Project: Wicket
>          Issue Type: Bug
>            Reporter: Marcel Barbosa Pinto
>            Assignee: Martin Grigorov
>             Fix For: 8.0.0-M5
>
>
> If you do this:
> {noformat}
> IPageManager pageManager = getSession().getPageManager();
> System.out.println("------>" + pageManager.toString());
> {noformat}
> It will return PageAccessSynchronizer instead IPageManager:
> {noformat}
> ------>org.apache.wicket.page.PageAccessSynchronizer$2@38834c7b
> {noformat}
> So I can't cast this to my custom class that extends IPageManager
> *org.apache.wicket.page.Session.java*
> {noformat}
> public final IPageManager getPageManager()
>       {
>               IPageManager pageManager = 
> Application.get().internalGetPageManager();
>               return pageAccessSynchronizer.get().adapt(pageManager);
>       }
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to