docs: public static String getValueToRender(FacesContext context, UIComponent component, Object value) {
          if (component instanceof ValueHolder) {
  
              if (component instanceof EditableValueHolder) {
                  EditableValueHolder input = (EditableValueHolder) component;
                  Object submittedValue = input.getSubmittedValue();
                  PrimeConfiguration config = PrimeApplicationContext.getCurrentInstance(context).getConfig();
  
                  if (config.isInterpretEmptyStringAsNull()
                          && submittedValue == null
                          && !input.isLocalValueSet()
                          && context.isValidationFailed()
                          && !input.isValid()) {
                      return null;
                  }
                  else if (submittedValue != null) {
                      return submittedValue.toString();
                  }
              }
  
              ValueHolder valueHolder = (ValueHolder) component;
              if (value == UNDEFINED_VALUE) {
                  value = valueHolder.getValue();
              }
  
              //format the value as string
              if (value != null) {
                  Converter converter = valueHolder.getConverter();
                  if (converter == null) {
                      Class valueType = value.getClass();
                      if (valueType == String.class
                              && !PrimeApplicationContext.getCurrentInstance(context).getConfig().isStringConverterAvailable()) {
                          return (String) value;
                      }
  
                      converter = context.getApplication().createConverter(valueType);
                  }
  
                  if (converter != null) {
                      return converter.getAsString(context, component, value);
                  }
                  else {
                      return value.toString();    //Use toString as a fallback if there is no explicit or implicit converter
                  }
              }
              else {
                  //component is a value holder but has no value
                  return null;
              }
          }
  
          //component it not a value holder
          return null;
      }