{
// found <wicket:head>
String headerId = getHeaderId(container, markupStream);
// Create a HeaderPartContainer and associate the markup
HeaderPartContainer headerPart = getHeaderPart(container, headerId,
markupStream.getMarkupFragment());
if (headerPart != null)
{
// A component's header section must only be added once,
// no matter how often the same Component has been added
// to the page or any other container in the hierarchy.
if (htmlContainer.okToRenderComponent(headerPart.getScope(), headerPart.getId()))
{
// make sure the Page is accessible
headerPart.setParent(htmlContainer);
headerPart.render();
}
}
// Position the stream after <wicket:head>
markupStream.skipComponent();