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

PageRequestHandlerTracker doesn't work with IRequestHandlerDelegate

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 8.0.0-M1, 7.4.0, 6.24.0
    • 8.0.0-M2, 6.25.0, 7.5.0
    • wicket
    • None

    Description

      From https://github.com/apache/wicket/pull/178:

      PageRequestHandlerTracker doesn't work with CryptoMapper.
      In mapRequest method in CryptoMapper it is created instance of RequestSettingRequestHandler and PageRequestHandlerTracker doesn't looking for IPageRequestHandler inside IRequestHandlerDelegate.

      Reproduce steps:
      1 application init method

      @Override
      public void init() {
          super.init();
          getRequestCycleListeners().add(new PageRequestHandlerTracker());
          setRootRequestMapper(new CryptoMapper(getRootRequestMapper(), this));
      }
      

      2 Try to get last handler in page or component

      @Override
      protected void onBeforeRender() {
          super.onBeforeRender();
          RequestCycle cycle = getRequestCycle();
          IPageRequestHandler lastHandler = PageRequestHandlerTracker.getLastHandler(cycle);
          System.out.println(lastHandler.getPageClass().getCanonicalName());
      }
      

      Attachments

        Activity

          People

            mgrigorov Martin Tzvetanov Grigorov
            mgrigorov Martin Tzvetanov Grigorov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: