code: protected int getValueForInput(FacesContext context, UIInput component, String itemValue, Map<String, Object> valueArray,
                  Converter converter) {
          try {
              int retInt = 0;
              if (itemValue == null || valueArray == null) {
                  return retInt;
              }
  
              if (valueArray.containsKey(itemValue)) {
                  retInt = Integer.parseInt((String) valueArray.get(itemValue));
  
                  return retInt % 3;
              }
              else {
                  return retInt;
              }
          }
          catch (final NumberFormatException ex) {
              throw new FacesException("State of '" + component.getClientId() + "' must be an integer representation");
          }
      }
docs: /*
  return the value for the triState based on the value of the selectItems on the iteration