[
https://issues.apache.org/jira/browse/WICKET-6337?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15924203#comment-15924203
]
Marcel Barbosa Pinto commented on WICKET-6337:
----------------------------------------------
Hi Martin,
Your solution will work nice for me.
Another more generic option would be do add a #getDelegate() to
PageManagerDecorator.java
Then I could do:
((MyCustomPageStoreManager)
getSession().getPageManager().getDelegate()).myCustomMethod();
> 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)