// using a prototype child tab.
Nav nav = (Nav) uiComponent;
Object value = nav.getValue();
String var = nav.getVar();
boolean iterateOverDataModel = ((value != null) && (var != null));
NavItem prototypeChildNavItem = null;
if (uiComponent instanceof Nav) {
prototypeChildNavItem = getFirstChildNavItem(nav);
}
// Encode the content for each tab.
if ((iterateOverDataModel) && (prototypeChildNavItem != null)) {
int rowCount = nav.getRowCount();
for (int i = 0; i < rowCount; i++) {
nav.setRowIndex(i);
prototypeChildNavItem.encodeAll(facesContext);
}
}
else {
List<UIComponent> children = nav.getChildren();