// head first.
if (container instanceof WebPage)
{
// Create a special header component which will gather
// additional input the <head> from 'contributors'.
final MarkupContainer header = new HtmlHeaderContainer(
HtmlHeaderSectionHandler.HEADER_ID + container.getPage().getAutoIndex());
// It is <wicket:head>. Because they do not provide any
// additional functionality they are merely a means of surrounding relevant
// markup. Thus we simply create a WebMarkupContainer to handle
// the tag.
final WebMarkupContainer header2 = new WebMarkupContainer(
HtmlHeaderSectionHandler.HEADER_ID)
{
private static final long serialVersionUID = 1L;
public boolean isTransparentResolver()
{
return true;
}
};
header2.setRenderBodyOnly(true);
header.add(header2);
container.autoAdd(header, markupStream);
}
else if (container instanceof HtmlHeaderContainer)
{
// It is <wicket:head>. Because they do not provide any
// additional functionality there are merely a means of surrounding
// relevant markup. Thus we simply create a WebMarkupContainer to handle
// the tag.
final WebMarkupContainer header = new WebMarkupContainer(
HtmlHeaderSectionHandler.HEADER_ID)
{
private static final long serialVersionUID = 1L;
public boolean isTransparentResolver()
{
return true;
}
};
header.setRenderBodyOnly(true);
try
{
container.autoAdd(header, markupStream);
}