ResponseWriter writer = facesContext.getResponseWriter();
boolean contentWritten = false;
for(UIComponent child : wizard.getChildren()) {
if(child instanceof Tab && child.isRendered()) {
Tab tab = (Tab) child;
writer.startElement("div", null);
writer.writeAttribute("id", tab.getId(), null);
writer.writeAttribute("class", "step", null);
if((wizard.getStep() == null || tab.getId().equals(wizard.getStep())) && !contentWritten) {
renderChildren(facesContext, tab);
contentWritten = true;
}
writer.endElement("div");