writer.endElement(DIV);
}
private void writeTabsLine(final ResponseWriter w, final FacesContext context, UIComponent comp) throws IOException {
w.startElement(DIV, comp);
final AbstractTabPanel tabPanel = (AbstractTabPanel) comp;
if (tabPanel.isHeaderPositionedTop()) {
w.writeAttribute(CLASS, "rf-tab-hdr-tabline-vis rf-tab-hdr-tabline-top", null);
} else {
w.writeAttribute(CLASS, "rf-tab-hdr-tabline-vis rf-tab-hdr-tabline-btm", null);
}
w.startElement("table", comp);
w.writeAttribute(CLASS_ATTRIBUTE, "rf-tab-hdr-tabs", null);
w.writeAttribute("cellspacing", "0", null);
w.startElement(TBODY_ELEMENT, comp);
w.startElement(TR_ELEMENT, comp);
writeTopTabFirstSpacer(w, comp);
if (tabPanel.getValue() != null) {
try {
DataVisitor visitor = new AbstractTogglePanelItemVisitor(tabPanel, new AbstractTogglePanelItemVisitor.TabVisitorCallback() {
@Override
public DataVisitResult visit(AbstractTogglePanelItemInterface item)
{
AbstractTab tab = (AbstractTab) item;
try {
writeTopTabHeader(context, w, tab);
writeTopTabSpacer(w, tabPanel);
} catch (IOException e) {
throw new RuntimeException(e);
}
return DataVisitResult.CONTINUE;
}
});
tabPanel.walk(context, visitor, null);
} finally {
tabPanel.setRowKey(context, null);
}
} else {
for (AbstractTogglePanelItemInterface item : ((AbstractTogglePanel) comp).getRenderedItems()) {
AbstractTab tab = (AbstractTab) item;
writeTopTabHeader(context, w, tab);