// Walk the indexed children
int count = ancestor.getIndexedChildCount(context);
for(int i = 0; i < count; i++)
{
UINode currChild = ancestor.getIndexedChild(context, i);
if (!renderedOnly || !BaseRenderer.skipNode(childContext, currChild))
{
if (path != null)
path.add(i);
// Walk the node, then its children
value = walker.walkNode(childContext, currChild, value, path);
if (walker.walkChildren(childContext, currChild, value, path))
{
value = _walkTree(childContext, currChild, walker, value, path,
renderedOnly);
}
if (path != null)
path.removeLastElement();
}
}
// Walk the named children
Iterator<String> e;
// For switcher beans, only walk the "CHILD_NAME_ATTR" bean; a
// SingleItemIterator does the trick quite well...
if (renderedOnly && _isSwitcherBean(ancestor))
{
Object name = ancestor.getAttributeValue(context,
UIConstants.CHILD_NAME_ATTR);
if (name == null)
e = null;
else
e = Collections.singletonList((String)name).iterator();
}
else
{
e = ancestor.getChildNames(context);
}
if (e != null)
{
while (e.hasNext())
{
String next = e.next();
UINode currNamedChild =
ancestor.getNamedChild(context, next);
if ((currNamedChild != null) &&
(!renderedOnly || !BaseRenderer.skipNode(childContext, currNamedChild)))
{
if (path != null)