Wicket
  1. Wicket
  2. WICKET-5429

ResourceReference's properties are not preserved when using reference replacement

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: 6.12.0
    • Fix Version/s: 6.13.0, 7.0.0-M1
    • Component/s: wicket
    • Labels:
      None

      Description

      Media property of link (css) is not set if addResourceReplacement is set on WebApplication.init :

      I set a css file on page via renderHead(IHeaderResponse response) with screen media :

      @Override
      public void renderHead(IHeaderResponse response)

      { response.render(CssHeaderItem.forReference(OriginalResourceReference.get(), "screen")); }

      and after if I defined a resourceReplacement on application init :

      @Override
      public void init()

      { super.init(); addResourceReplacement(OriginalResourceReference.get(), new CssResourceReference(OriginalResourceReference.class, "overwrite.css")); }

      I don't have the property media="screen" when wicket generated page.

      Duto

      1. WICKET-5429-RRBR.patch
        9 kB
        Martin Grigorov
      2. fix-WICKET-5429.patch
        1 kB
        Cedric Gatay
      3. Sample.zip
        24 kB
        Duto

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Martin Grigorov
            Reporter:
            Duto
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development