code: protected Object filterModel(Map<String, Object> model) {
          Map<String, Object> result = new HashMap<String, Object>(model.size());
          Set<String> renderedAttributes =
                  !CollectionUtils.isEmpty(this.renderedAttributes) ? this.renderedAttributes : model.keySet();
          for (Map.Entry<String, Object> entry : model.entrySet()) {
              if (!(entry.getValue() instanceof BindingResult) && renderedAttributes.contains(entry.getKey())) {
                  result.put(entry.getKey(), entry.getValue());
              }
          }
          if (result.size() == 1) {
          	return result.values().iterator().next();
          } else {
          	return result;
          }
      }
docs: Filters out undesired attributes from the given model. The return value can be either another {@link Map}, or a
  single value object.  If only a single attribute is present in the model map, that value will be returned instead
  of the full map.
  
  <p>Default implementation removes {@link BindingResult} instances and entries not included in the {@link
  #setRenderedAttributes(Set) renderedAttributes} property.
  
  @param model the model, as passed on to {@link #renderMergedOutputModel}
  @return the object to be rendered