// we aren't stamping, but rather have explicitly defined children:
for(UIComponent child : (List<UIComponent>)component.getChildren())
{
try
{
UIXCommand navItem = (UIXCommand)child;
if (navItem.isRendered())
{
// collect the information needed to render this nav item:
_collectNavItemData(navItemData, navItem, -1, component);
}
}
catch (ClassCastException cce)
{
_LOG.severe("ILLEGAL_COMPONENT_HIERARCHY_UIXCOMMAND_EXPECTED", cce);
}
}
}
else
{
if (!(nodeStamp instanceof UIXCommand))
{
_LOG.severe("ILLEGAL_COMPONENT_HIERARCHY_UIXCOMMAND_EXPECTED");
return;
}
UIXCommand navStamp = (UIXCommand) nodeStamp;
// we are stamping the children:
// Save the current key
Object oldPath = component.getRowKey();
_setStartDepthPath(component,
((UIXNavigationLevel) component).getLevel());
int componentRowCount = component.getRowCount();
if (componentRowCount != 0)
{
int startIndex = component.getFirst();
int endIndex = TableUtils.getLast(component, startIndex);
for (int i = startIndex; i <= endIndex; i++)
{
component.setRowIndex(i);
if (navStamp.isRendered())
{
// collect the information needed to render this nav item:
_collectNavItemData(navItemData, navStamp, i, component);
}
}