Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-6336

Add #removePage(IManageablePage) to IPageManager

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 7.6.0
    • Fix Version/s: 8.0.0-M5
    • Component/s: wicket
    • Labels:
      None

      Description

      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

        Issue Links

          Activity

          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit e848130d48facdd2782385175070a302d45e3d8b in wicket's branch refs/heads/master from Martin Grigorov
          [ https://git-wip-us.apache.org/repos/asf?p=wicket.git;h=e848130 ]

          WICKET-6336 Add #removePage(IManageablePage) to IPageManager

          Show
          jira-bot ASF subversion and git services added a comment - Commit e848130d48facdd2782385175070a302d45e3d8b in wicket's branch refs/heads/master from Martin Grigorov [ https://git-wip-us.apache.org/repos/asf?p=wicket.git;h=e848130 ] WICKET-6336 Add #removePage(IManageablePage) to IPageManager
          Hide
          mgrigorov Martin Grigorov added a comment -

          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:

          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);
          }
          

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

          Show
          mgrigorov Martin Grigorov added a comment - 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: 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); } but as you can see it is not looking good at all.
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 91abd2e8c170352727c5c9e9f3bb704f50cd1198 in wicket's branch refs/heads/WICKET-6337-IPageManager-removePage-7.x from Martin Grigorov
          [ https://git-wip-us.apache.org/repos/asf?p=wicket.git;h=91abd2e ]

          WICKET-6336 Add #removePage(IManageablePage) to IPageManager

          Show
          jira-bot ASF subversion and git services added a comment - Commit 91abd2e8c170352727c5c9e9f3bb704f50cd1198 in wicket's branch refs/heads/ WICKET-6337 -IPageManager-removePage-7.x from Martin Grigorov [ https://git-wip-us.apache.org/repos/asf?p=wicket.git;h=91abd2e ] WICKET-6336 Add #removePage(IManageablePage) to IPageManager

            People

            • Assignee:
              mgrigorov Martin Grigorov
              Reporter:
              mbppower Marcel Barbosa Pinto
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development