UIXRenderingContext context,
UINode node
) throws IOException
{
UIXPage component = (UIXPage) node.getUIComponent();
UINode stamp = this.getNamedChild(context, node, NODE_STAMP_CHILD);
if(stamp == null)
return;
// Save the current path
Object oldPath = component.getRowKey();
Object focusRowKey = component.getFocusRowKey();
int startDepth = 0;
// when you get the focusPath the menuModel may not restore the path
// properly, so be sure to set the path to the value you want after the
// call to getFocusPath.
component.setRowKey(null);
List<Object> focusPath = Collections.EMPTY_LIST;
if (focusRowKey != null)
{
focusPath = component.getAllAncestorContainerRowKeys(focusRowKey);
focusPath = new ArrayList<Object>(focusPath);
focusPath.add(focusRowKey);
}
int size = focusPath.size();
if (focusRowKey != null )
{
if ( size > startDepth )
{
component.setRowKey(focusPath.get(startDepth));
}
else
{
// Restore the current path
component.setRowKey(oldPath);
return;
}
}
else
{
// Restore the current path
component.setRowKey(oldPath);
return;
}
for (int i = startDepth; i < size; i++)
{
component.setRowKey(focusPath.get(i));
renderStamp(context, node, stamp, (i+1 == size));
}
// Restore the current path
component.setRowKey(oldPath);
}