Github user martin-g commented on a diff in the pull request:
https://github.com/apache/wicket/pull/232#discussion_r136862001
--- Diff:
wicket-core/src/main/java/org/apache/wicket/markup/renderStrategy/AbstractHeaderRenderStrategy.java
---
@@ -116,7 +119,32 @@ protected void renderRootComponent(final
HtmlHeaderContainer headerContainer,
final HeaderStreamState headerStreamState, final Component
rootComponent)
{
headerContainer.renderHeaderTagBody(headerStreamState);
+
rootComponent.internalRenderHead(headerContainer);
+
+ // If the root component is an inline enclosure, then we force
header render of its controller as well; normally
+ // this would not trigger because the controller is a sibling
of the enclosure
+ if (rootComponent instanceof InlineEnclosure) {
--- End diff --
The code looks good to me!
Just let's extract it in its own method to reduce the complexity.
E.g. `renderInlineEnclosure( HtmlHeaderContainer)`
---