Wicket
  1. Wicket
  2. WICKET-3728

Allow filtering and grouping of resources in the <head>

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.5-RC4
    • Fix Version/s: 1.5-RC5
    • Component/s: wicket
    • Labels:
      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.

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

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Juergen Donnerstag
            Reporter:
            Martin Grigorov
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development