boolean beforeRenderBody(MarkupWriter writer) {
TabGroupModel tabModel = (TabGroupModel) request.getAttribute(TabGroup.ATTRIBUTE_MODEL);
if (tabModel == null) {
throw new IllegalStateException("Tab must be nested inside a TabGroup");
}
tabModel.addTab(name, label, resources.getBody());
// don't render the body, it will be rendered by the TabGroup
return false;
}
}