public abstract class BindingResultUtils
extends java.lang.Object
BindingResult.MODEL_KEY_PREFIX
Constructor and Description |
---|
BindingResultUtils() |
Modifier and Type | Method and Description |
---|---|
static BindingResult |
getBindingResult(java.util.Map<?,?> model,
java.lang.String name)
Find the BindingResult for the given name in the given model.
|
static BindingResult |
getRequiredBindingResult(java.util.Map<?,?> model,
java.lang.String name)
Find a required BindingResult for the given name in the given model.
|
public static BindingResult getBindingResult(java.util.Map<?,?> model, java.lang.String name)
model
- the model to searchname
- the name of the target object to find a BindingResult fornull
if none foundjava.lang.IllegalStateException
- if the attribute found is not of type BindingResultpublic static BindingResult getRequiredBindingResult(java.util.Map<?,?> model, java.lang.String name)
model
- the model to searchname
- the name of the target object to find a BindingResult fornull
)java.lang.IllegalStateException
- if no BindingResult found