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

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

I've thought about adding #getDelegate() but this method will make the need of 
PageManagerDecorator obsolete. This decorator is needed for the page locking 
management in PageAccessSynchronizer. With this method it will be possible to 
manage pages without locking/unlocking them. And this could lead to big issues. 

> 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