if (index < 0)
{
throw new IllegalStateException("positive index must be given");
}
UIComponent uiSelectOne = radio.findComponent(forAttr);
if (uiSelectOne == null)
{
throw new IllegalStateException("Could not find component '" + forAttr + "' (calling findComponent on component '" + radio.getClientId(facesContext) + "')");
}
if (!(uiSelectOne instanceof UISelectOne))