code: static boolean matchValue(FacesContext ctx,
                                UIComponent component,
                                Object value,
                                Iterator<SelectItem> items,
                                Converter converter) {
  
          while (items.hasNext()) {
              SelectItem item = items.next();
              if (item instanceof SelectItemGroup) {
                  SelectItem subitems[] =
                        ((SelectItemGroup) item).getSelectItems();
                  if ((subitems != null) && (subitems.length > 0)) {
                      if (matchValue(ctx, component, value, new ArrayIterator(subitems), converter)) {
                          return (true);
                      }
                  }
              } else {
                  Object compareValue = null;
                  
                  try {
                      compareValue = doConversion(ctx, component, item, value,
                          converter);
                  } catch (IllegalStateException ise) {
                      continue;
                  }
                  
                  if (null == compareValue && null == value) {
                      return true;
                  }
  
                  if (value.equals(compareValue)) {
                      return (true);
                  }
              }
          }
          return (false);
  
      }
docs: <p>Return <code>true</code> if the specified value matches one of the
  available options, performing a recursive search if if a {@link
  javax.faces.model.SelectItemGroup} instance is detected.</p>
  
  @param ctx          {@link FacesContext} for the current request
  @param value        {@link UIComponent} value to be tested
  @param items        Iterator over the {@link javax.faces.model.SelectItem}s
  to be checked
  @param converter    the {@link Converter} associated with this component