Allow filtering and grouping of resources in the <head>
-------------------------------------------------------

                 Key: WICKET-3728
                 URL: https://issues.apache.org/jira/browse/WICKET-3728
             Project: Wicket
          Issue Type: Improvement
          Components: wicket-core
    Affects Versions: 1.5-RC4
            Reporter: Martin Grigorov
            Assignee: Martin Grigorov
             Fix For: 1.5-RC5


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.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to