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

Allow filtering and grouping of resources in the <head>

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.5-RC4
    • 1.5-RC5
    • wicket
    • None

    Description

      With DecoratingHeaderResponse and few supporting classes it is possible currently to group and filter header contributions, e.g. to render all JavaScript resources just before the closing tag of the body (</body>). See http://www.wicket-library.com/wicket-examples/resourceaggregation for an example in action.
      Unfortunately it is not possible to use the grouping feature in the <head> tag currently because HtmlHeaderContainer first renders its body and then asks for other components' header contributions. While rendering its body it tries to render the placeholder for the header group and fails at org.apache.wicket.resource.filtering.HeaderResponseFilteredResponseContainer.onComponentTagBody(MarkupStream, ComponentTag) saying that the IHeaderResponse is not closed yet.
      To allow this I'm suggesting a patch that will first collect other components' header contribution, then close the IHeaderResponse and finally collect the <head>'s body. At the end it will render the head's body first and then the header contributions as it is now.

      Attachments

        1. WICKET-3728.patch
          3 kB
          Martin Tzvetanov Grigorov
        2. wicket-3728-quickstart.tgz
          19 kB
          Martin Tzvetanov Grigorov

        Activity

          People

            jdonnerstag Juegen Donnerstag
            mgrigorov Martin Tzvetanov Grigorov
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: