for(Iterator<UIComponent> kids = accordionPanel.getChildren().iterator(); kids.hasNext();) {
UIComponent kid = (UIComponent) kids.next();
if(kid.isRendered() && kid instanceof Tab) {
Tab tab = (Tab) kid;
writer.startElement("li", null);
writer.startElement("p", null);
if(tab.getTitle() != null)
writer.write(tab.getTitle());
writer.endElement("p");
writer.startElement("div", null);
renderChild(facesContext, tab);
writer.endElement("div");