UIXRenderingContext context,
UINode node
) throws IOException
{
UIXHierarchy component = getHierarchyBase(context, node);
UINode stamp = getStamp(context, node);
if(stamp != null)
{
// Save the current key
Object oldPath = component.getRowKey();
boolean isNewPath = setNewPath(context, node, component);
if (isNewPath)
{
int size = component.getRowCount();
int rowIndex = component.getRowIndex();
boolean needsSeparator = false;
boolean isSelected = false;
boolean isFirst = false;
boolean isLast = false;
boolean isNextSelected = false;
int lastIndex = size - 1;
for (int i = size-1; i >= 0; i--)
{
component.setRowIndex(i);
boolean isRendered = isRendered(context, stamp);
if (isRendered == true)
{
lastIndex = i;
break;
}
}
int firstIndex = 0;
for (int i = 0; i < size; i++)
{
component.setRowIndex(i);
boolean isRendered = isRendered(context, stamp);
if (isRendered == true)
{
firstIndex = i;
break;
}
}
for (int i = 0; i < size; i++)
{
component.setRowIndex(i);
boolean isRendered = isRendered(context, stamp);
if (isRendered)
{
if (needsSeparator)
renderBetweenNodes(context, node);
else
needsSeparator = true;
// =-=gc this doesn't account for rendered being false properly
isSelected = i == rowIndex;
isFirst = i==firstIndex;
isLast = i==lastIndex;
isNextSelected = i+1 == rowIndex;
renderNode(context, stamp, isSelected,
isFirst, isLast, isNextSelected);
}
}
// Restore the old path
component.setRowKey(oldPath);
}
if (getVisibleIndexedChildCount(context, node) > 0)
renderBetweenNodes(context, node);
}