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

ResourceReference's properties are not preserved when using reference replacement

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: 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

        Attachments

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

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: