code: protected void showIndicatorsForComponent(final List<Diagnostic> diags, final int severity) {
  		FieldIndicatorModel model = getComponentModel();
  		if (model != null && !model.diagnostics.isEmpty()) {
  			model = getOrCreateComponentModel();
  			model.diagnostics.clear();
  		}
  
  		if (diags != null && !diags.isEmpty()) {
  			model = getOrCreateComponentModel();
  			UIContext uic = UIContextHolder.getCurrent();
  
  			for (int i = 0; i < diags.size(); i++) {
  				Diagnostic diagnostic = diags.get(i);
  
  				if (diagnostic.getSeverity() == severity && uic == diagnostic.getContext()
  					// To support repeated components.
  					&& relatedField == diagnostic.getComponent()) {
  					model.diagnostics.add(diagnostic);
  				}
  			}
  		}
  
  	}
docs: Iterates over the {@link Diagnostic}s and finds the diagnostics that related to {@link #relatedField}.
  
  @param diags A List of Diagnostic objects.
  @param severity A Diagnostic severity code. e.g. {@link Diagnostic#ERROR}