if (Collection.class.isAssignableFrom(valueType)
|| Object.class.equals(valueType))
{
// try to get the by-type-converter from the type of the SelectItems
return _SharedRendererUtils.getSelectItemsValueConverter(
new SelectItemsIterator(component, facesContext),
facesContext);
}
if (!valueType.isArray())
{
throw new IllegalArgumentException(
"ValueExpression for UISelectMany : "
+ getPathToComponent(component)
+ " must be of type Collection or Array");
}
Class<?> arrayComponentType = valueType.getComponentType();
if (String.class.equals(arrayComponentType))
{
return null; //No converter needed for String type
}
if (Object.class.equals(arrayComponentType))
{
// There is no converter for Object class
// try to get the by-type-converter from the type of the SelectItems
return _SharedRendererUtils.getSelectItemsValueConverter(
new SelectItemsIterator(component, facesContext),
facesContext);
}
try
{