You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Martin Grigorov (JIRA)" <ji...@apache.org> on 2017/03/13 21:26:41 UTC

[jira] [Resolved] (WICKET-6336) Add #removePage(IManageablePage) to IPageManager

     [ https://issues.apache.org/jira/browse/WICKET-6336?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Grigorov resolved WICKET-6336.
-------------------------------------
       Resolution: Fixed
    Fix Version/s: 8.0.0-M5

Implemented IPageManager#removePage(IManageablePage) in 8.x.
It is not possible to do it in 7.x because adding new methods to interfaces is an  API break.

It is possible to add the method only to the (abstract) classes but then one will have to do things like:

{code}
if (pageManager instanceof AbstractPageManager) {
  ((AbstractPageManager) pageManager).removePage(page);
}
else if (pageManager instanceof PageManagerDecorator) {
  ((PageManagerDecorator) pageManager).removePage(page);
}
else if (pageManager instanceof IMockPageManager) {
  ((IMockPageManager) pageManager).removePage(page);
}
{code}

but as you can see it is not looking good at all.

> Add #removePage(IManageablePage) to IPageManager
> ------------------------------------------------
>
>                 Key: WICKET-6336
>                 URL: https://issues.apache.org/jira/browse/WICKET-6336
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 7.6.0
>            Reporter: Marcel Barbosa Pinto
>            Assignee: Martin Grigorov
>            Priority: Minor
>             Fix For: 8.0.0-M5
>
>
> I would like to implement a #removePage(Page page) inside the SessionEntry but I can`t subclass it. Would be nice to have this implemented by default anyway.
> wicket-core/src/main/java/org/apache/wicket/page/PageStoreManager.java



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