类 BindingResultUtils
java.lang.Object
cn.taketoday.validation.BindingResultUtils
Convenience methods for looking up BindingResults in a model Map.
- 从以下版本开始:
- 4.0
- 作者:
- Juergen Hoeller
- 另请参阅:
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static 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.
-
构造器详细资料
-
BindingResultUtils
public BindingResultUtils()
-
-
方法详细资料
-
getBindingResult
Find the BindingResult for the given name in the given model.- 参数:
model- the model to searchname- the name of the target object to find a BindingResult for- 返回:
- the BindingResult, or
nullif none found - 抛出:
IllegalStateException- if the attribute found is not of type BindingResult
-
getRequiredBindingResult
Find a required BindingResult for the given name in the given model.- 参数:
model- the model to searchname- the name of the target object to find a BindingResult for- 返回:
- the BindingResult (never
null) - 抛出:
IllegalStateException- if no BindingResult found
-