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

Remove final from WebRequestCodingStrategy. urlCodingStrategyForPath

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.3.0-beta3
    • 1.3.0-rc1
    • wicket
    • None

    Description

      I am trying to use my own encoding that does not depend on mounted paths. I want normal mounted paths and the default wicket paths to work as usual and for my strategy to be used after they have been tried.

      For encoding URLs with my strategy I can override WebRequestCodingStrategy .getMountEncoder(IRequestTarget) which allows the normal mounts to be tried first and then return my strategy if non are found.

      The default decoding works OK but WebRequestCycleProcessor will call WebRequestCodingStrategy .targetForRequest() after the default handling fails and I cannot return my own strategy because I cannot override urlCodingStrategyForPath() because it is final.

      I have removed this locally and it works as I expected.

      It seems like the only option at the moment is to use a subclass or WebRequestCodingStrategy AND create an adaptor (wrapper) for WebRequestCodingStrategy which detects when targetForRequest() returns null and returns my own strategy.

      If the final is removed from rlCodingStrategyForPath(String path) life would be a lot easier!

      Attachments

        Activity

          People

            Unassigned Unassigned
            jdpatterson John Patterson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: