code: static Converter getSelectItemsValueConverter(Iterator<SelectItem> iterator, FacesContext facesContext)
      {
          // Attention!
          // This code is duplicated in jsfapi component package.
          // If you change something here please do the same in the other class!
          
          Converter converter = null;
          while (converter == null && iterator.hasNext())
          {
              SelectItem item = iterator.next();
              if (item instanceof SelectItemGroup)
              {
                  Iterator<SelectItem> groupIterator = Arrays.asList(
                          ((SelectItemGroup) item).getSelectItems()).iterator();
                  converter = getSelectItemsValueConverter(groupIterator, facesContext);
              }
              else
              {
                  Class<?> selectItemsType = item.getValue().getClass();
                  
                  // optimization: no conversion for String values
                  if (String.class.equals(selectItemsType))
                  {
                      return null;
                  }
                  
                  try
                  {
                      converter = facesContext.getApplication().createConverter(selectItemsType);
                  }
                  catch (FacesException e)
                  {
                      // nothing - try again
                  }
              }
          }
          return converter;
      }
docs: Iterates through the SelectItems with the given Iterator and tries to obtain
  a by-class-converter based on the Class of SelectItem.getValue().
  @param iterator
  @param facesContext
  @return The first suitable Converter for the given SelectItems or null.