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

RelativePathPrefixHandler and WicketMessageTagHandler conflict

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.3.0-beta1
    • 1.3.0-beta2
    • wicket
    • None

    Description

      We have a bit of an issue with IMarkupFilter implementations, in that you can't currently layer two different IComponentResolvers if they both want to alter the same thing.

      This is currently an issue for SimplePageTest for testRenderHomePage_7, which is why that's failing.

      Specifically, it goes:
      <input type="image"
      src="test.gif"
      wicket:message="attr-name:i18n-key">test 2</input>

      Correct behaviour here is:

      • Prepend the src attribute with "../" links to make it
        context-relative.
      • Add an attribute "attr-name" with the appropriate i18n message.

      MarkupParser adds WicketMessageTagHandler is before the RelativePathPrefixHandler, so currently that "wins" and resolves the component first. It doesn't get added as a RelativePathPrefixHandler auto-add component, so the behaviour to prefix URLs isn't added, so the src attribute remains "test.gif", not "../test.gif" and the test fails.

      We need to somehow support chaining these things together, but I'm not sure how - it's really not obvious.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              almaw Alastair Maw
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: