writer.startElement("ul", null);
writer.writeAttribute("class", Wizard.STEP_STATUS_CLASS, null);
for(UIComponent child : wizard.getChildren()) {
if(child instanceof Tab && child.isRendered()) {
Tab tab = (Tab) child;
String title = tab.getTitle();
UIComponent titleFacet = tab.getFacet("title");
boolean active = (!currentFound) && (currentStep == null || tab.getId().equals(currentStep));
String titleStyleClass = active ? Wizard.ACTIVE_STEP_CLASS : Wizard.STEP_CLASS;
if(tab.getTitleStyleClass() != null) {
titleStyleClass = titleStyleClass + " " + tab.getTitleStyleClass();
}
if(active) {
currentFound = true;
}
writer.startElement("li", null);
writer.writeAttribute("class", titleStyleClass, null);
if(tab.getTitleStyle() != null) writer.writeAttribute("style", tab.getTitleStyle(), null);
if(tab.getTitletip() != null) writer.writeAttribute("title", tab.getTitletip(), null);
if(titleFacet != null)
titleFacet.encodeAll(context);
else if(title != null)
writer.writeText(title, null);