return optionSelected;
}
private int _getChildIndex(UIXRenderingContext context)
{
Path path = context.getPath();
// If the path is empty, this means we're working with composite
// rendering. Jump up to the parent, and use the end of its Path.
// Sadly, this isn't perfect - it only helps you if the <option>
// is tops in the template/composite widget - but it helps out a lot.
if (path.getElementCount() == 0)
{
UIXRenderingContext parent = context.getParentContext();
if (parent == null)
return -1;
return _getChildIndex(parent);
}
return path.getElementIndex(-1);
}