Package org.springframework.validation
Class BindingResultUtils
java.lang.Object
org.springframework.validation.BindingResultUtils
Convenience methods for looking up BindingResults in a model Map.
- Since:
- 2.0
- Author:
- Juergen Hoeller
- See Also:
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic BindingResultgetBindingResult(Map<?, ?> model, String name) Find the BindingResult for the given name in the given model.static BindingResultgetRequiredBindingResult(Map<?, ?> model, String name) Find a required BindingResult for the given name in the given model.
- 
Constructor Details- 
BindingResultUtilspublic BindingResultUtils()
 
- 
- 
Method Details- 
getBindingResultFind the BindingResult for the given name in the given model.- Parameters:
- model- the model to search
- name- the name of the target object to find a BindingResult for
- Returns:
- the BindingResult, or nullif none found
- Throws:
- IllegalStateException- if the attribute found is not of type BindingResult
 
- 
getRequiredBindingResultFind a required BindingResult for the given name in the given model.- Parameters:
- model- the model to search
- name- the name of the target object to find a BindingResult for
- Returns:
- the BindingResult (never null)
- Throws:
- IllegalStateException- if no BindingResult found
 
 
-