public static void addError(RadComponent component, ErrorInfo errorInfo) {
    List<ErrorInfo> errorInfos = component.getClientProperty(ERROR_KEY);
    if (errorInfos == null) {
      errorInfos = new ArrayList<>();
      component.setClientProperty(ERROR_KEY, errorInfos);
    }
    errorInfos.add(errorInfo);
  }
public static void addError(RadComponent component, ErrorInfo errorInfo)